looking to have 2 lines, same length, with the angle changing between them? Cant figure out how to animate this?
2 ビュー (過去 30 日間)
古いコメントを表示
回答 (1 件)
Image Analyst
2014 年 11 月 25 日
Use a for loop, line(), and pause(). If the lines are connected, you can use line() once. If the line segments are not touching, then it's probably easiest to call line twice with "hold on" in between (or else separate the two segments with nan's).
Sounds like homework so I'll just give a hint.
for angle = 0 : 360
x1 = ....
x2 = ....
x3 = .....
x4 = ....
x1 = ....
x2 = ....
x3 = .....
x4 = ....
line([x1,x2,x3,x4], [y1,y2,y3,y4]);
drawnow;
pause(.5); % Pause so we can see it.
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Animation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!