Subscript indices must either be real positive integers or logicals.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Luigi Stragapede
am 13 Mai 2020
Beantwortet: Tommy
am 13 Mai 2020
I need to consider this for end loop:
for thetat=0:0.012566:0.6283 %I need 50 points
...
...
end
How can I do if I cannot take decimal indices?
0 Kommentare
Akzeptierte Antwort
Tommy
am 13 Mai 2020
thetat=0:0.012566:0.6283;
for idx = 1:numel(thetat)
% use thetat(idx) to access the appropriate theta value in any iteration of the loop
...
...
end
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!