フィルターのクリア

How to plot multiple plots in a loop ?

29 ビュー (過去 30 日間)
Negar
Negar 2014 年 12 月 4 日
コメント済み: Negar 2014 年 12 月 4 日
Hello all,
I want to plot 2 graphs in each loop so that they will appear in two separate figures, with consecutive number order, I mean: after first looping: figure 1, figure 2. After second looping: figure 3, figure 4 and so on. How do I achieve that? I tried to make the code as follows,
if true
for i = 1:3
figure(i);
plot (something);
figure(i+1) plot (something else);
end
but I get the order as : figure(1), figure(2), figure(2), figure(3), figure(3), figure(4) !!

採用された回答

Adam
Adam 2014 年 12 月 4 日
for i = 1:3
figure(2*i - 1); plot( something );
figure(2*i); plot( somethingElse );
end
  1 件のコメント
Negar
Negar 2014 年 12 月 4 日
Thank you so much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Objects についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by