Going with a loop to a selected point

2 ビュー (過去 30 日間)
Adem Kikaj
Adem Kikaj 2015 年 11 月 7 日
コメント済み: Adem Kikaj 2015 年 11 月 7 日
I want to go to a selected point like (9,9,) from the origin (0,0), with a loop using scatter() so it would look like a line (animated line). I have this code but it works only for an x=y point. How do I have to modify it to go at a point like (8.157,5.254)
figure
axis([0 10 0 10])
grid
hold on
Start = [0 0];
End = [9 9];
for i=1:0.01:End(1) % I have use End(1) because they're same at position one and two
scatter(i, i, 'black','filled');
pause(.05)
end
  2 件のコメント
Image Analyst
Image Analyst 2015 年 11 月 7 日
I fixed the formatting this time but for your next post, see this link
Adem Kikaj
Adem Kikaj 2015 年 11 月 7 日
Thank you

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

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by