Hi, I have this:
plot(time,n)
and I want each data to be plotted one by one, i tried with a this
for p=1:1:24
plot(time,n)
hold on
plot(time, n(p))
end
but I really don't have idea how to do it...
thanks,

 採用された回答

KSSV
KSSV 2016 年 11 月 25 日

1 投票

clc; clear all ;
x = 1:100 ;
y = rand(1,100) ;
for i = 1:100
plot(x(1:i),y(1:i))
axis([0 100 min(y) max(y)])
drawnow
end
Or
comet(x,y)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

質問済み:

Ale
2016 年 11 月 25 日

回答済み:

2016 年 11 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by