Indexing and Iteration issues
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Input:
for j=1:NS
tsr(j)=((r(j)*rot)/v); %TSR
end
For loop iteration
X(j) requires tsr(j) and a(j).
Both X(j) and a(j) changes every loop.
Before, I use X1(i-1), X2 (i-1).
After receiving suggestions from this forum to use indexing instead, I revised the code using indexing (still a newbie ^^,)
Any idea on how to approach this? It seems I have to deal with X(j,i-1) where j, indexes to 20 variables (equal to X1,X2, X20) and i has something to do with iteration.
Kind regards,
Wes
5 Kommentare
Stephen23
am 28 Apr. 2017
Bearbeitet: Stephen23
am 28 Apr. 2017
Since you are new to MATLAB, you should do the introductory tutorials (which are highly recommended for all beginners, and they introduce indexing:
Remember to read the MATLAB documentation instead of guessing how it works:
And also read this:
Antworten (0)
Siehe auch
Kategorien
Mehr zu Wind Power finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!