Plot a figure as time progresses?

12 ビュー (過去 30 日間)
Hancheol
Hancheol 2013 年 4 月 29 日
Hi
I wanna plot a figure sequentially as time progresses.
For example if we plot
t=0:0.1:10; x=t.^2; plot(t,x);
then we have only a curve.
But I wanna have a figure that starts at the origin and ends at (10,100).
Is there any method or command to do this?
Thanks.

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 4 月 29 日
t=0:0.1:10;
x=t.^2;
figure;
hold on
xlim([min(t) max(t)])
ylim([min(x) max(x)])
for k=1:numel(t)
plot(t(k),x(k));
pause(0.1)
end
  1 件のコメント
Hancheol
Hancheol 2013 年 4 月 29 日
I found the command.
It was 'comet.'
But your answer was also helpful.
Thanks. :)

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

その他の回答 (1 件)

Sachin Ganjare
Sachin Ganjare 2013 年 4 月 29 日
  1 件のコメント
Hancheol
Hancheol 2013 年 4 月 29 日
Thanks for your answer.
Yours was also helpful, but the answer below seemed more direct and simple to me.
But I wanna say thank you, too. :)

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

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by