Why is my for loop not working?
古いコメントを表示
Hello, My code is pretty straightforward
for x = 1:3
y = pi/x
end
I want to get the value of y for each x (i.e. x = 1, x = 2, x =3). But when I run this code, I only get the value of y for x = 3 in my workspace.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Statics and Dynamics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!