Creating a loop and loop variable
5 ビュー (過去 30 日間)
表示 古いコメント
Hi guys,
How would I write a for loop in which the loop variable runs from 0 to pi/2 in steps of 0.01?
Am i right in saying:
for
A = 0:0.01:pi/2
end
Is this correct?
採用された回答
Yusuf Suer Erdem
2021 年 12 月 7 日
編集済み: Yusuf Suer Erdem
2021 年 12 月 7 日
for a=0:a+0.01:pi/2
disp(a)
end
4 件のコメント
Yusuf Suer Erdem
2021 年 12 月 7 日
maybe used i as a character. i changed it with a. it should be okey now.
その他の回答 (0 件)
参考
カテゴリ
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!