Animating collision GUI - changing position
1 回表示 (過去 30 日間)
古いコメントを表示
Hi! we have a project to create a GUI of our choice and our group is doing a collisions. We are trying to move the two circles plotted based on the velocity inputted by the user. It has been suggested that we create a position vector and update it in a loop based on the velocity but I am just a little confused about how to go about this. Any thoughts??
0 件のコメント
回答 (1 件)
Sam McDonald
2017 年 4 月 19 日
There are a few techniques for creating animations in MATLAB. Refer to these links for examples:
https://www.mathworks.com/help/matlab/creating_plots/animation-techniques.html https://www.mathworks.com/help/matlab/ref/animatedline.html#buhnqpr-1
For your specific case, updating a position vector according to the time that has passed is a good approach. MATLAB has a timer object available for use, or you could simply use the "pause" function to get started. Here are some more useful links:
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!