tracing a path using plot
17 ビュー (過去 30 日間)
古いコメントを表示
I want to see a line being traced on screen as the loop is running.
x=0; y=0;
for t=1:0.01:10
plot(x+t, y+t, 'red')
hold on
end
In the code above, it just shows the 'end result' which is a graph of a straight line. I want to run it like a 'movie'. What should I have added?
0 件のコメント
回答 (1 件)
Walter Roberson
2015 年 10 月 20 日
for t=1:0.01:10
plot(x+t, y+t, 'red')
hold on
drawnow()
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!