Is it possible to update two different graphs?

3 ビュー (過去 30 日間)
David Koenig
David Koenig 2012 年 9 月 2 日
I want to have a time loop going that generates a snapshot of a vibrating string and on a different figure a snapshot of a vibrating membrane. Every time around the time loop I want to present a new snapshot of the string and the membrane. So, I want to keep two different graphs going. I already do it successfully when I work on just the string or just the membrane but now my time loop is generating data on both the string and the membrane.
Therefore, is it possible to keep two different graphs going?
Thanks.

採用された回答

Sven
Sven 2012 年 9 月 2 日
編集済み: Sven 2012 年 9 月 2 日
Hi David,
What exactly do you mean by "keep two different graphs going"?
If you just mean that you want to have two graphs on the screen and have them update at time intervals... yes, that's possible.
fig1 = figure('Position',[50 50 300 300])
fig2 = figure('Position',[350 50 300 300])
while 1
figure(fig1), plot(rand(10,1))
figure(fig2), plot(rand(20,1))
drawnow
pause(1)
end
Does the code above help you out?
  1 件のコメント
David Koenig
David Koenig 2012 年 9 月 2 日
Hi Sven,
Yes, that is exactly what I wanted. Thanks!
Dave

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by