フィルターのクリア

For Loop through a Plot

2 ビュー (過去 30 日間)
Amanda
Amanda 2013 年 5 月 9 日
I have the following data:
A1 = [1 2;3 4]
A2 = [3 4; 5 6]
A3 = [7 4; 3 2]
I want to plot A(n) through a for loop for 3 different generation plots. Something similar to this:
for i = 1:3
plot(A(i))
end
Thanks,
Amanda

採用された回答

the cyclist
the cyclist 2013 年 5 月 9 日
編集済み: the cyclist 2013 年 5 月 9 日
Use cell arrays:
A{1} = [1 2;3 4]
A{2} = [3 4; 5 6]
A{3} = [7 4; 3 2]
for i = 1:3
figure
plot(A{i})
end
It wasn't perfectly clear how you wanted this plotted. I did three separately figures for the three plots.

その他の回答 (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