plotting all indices in a for loop

1 回表示 (過去 30 日間)
shobhit mehrotra
shobhit mehrotra 2014 年 9 月 4 日
回答済み: Star Strider 2014 年 9 月 4 日
i have this code
for n=1:35
A = sin(n*3)
B= cos(n^2)*3))
plot (A,B)
end
however when i plot it only plots the last point, how can i plot all of the points in the array?

採用された回答

Star Strider
Star Strider 2014 年 9 月 4 日
This should work:
for n=1:35
A(n) = sin(n*3)
B(n) = cos(n^2)*3))
plot (A,B)
end

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by