mobility of an object in specific distance with a specific speed

2 ビュー (過去 30 日間)
Moin Ali
Moin Ali 2020 年 8 月 17 日
回答済み: Tarunbir Gambhir 2020 年 9 月 3 日
hey guys!!!
actually i am writing code for moving an object (70km/h) and i want to cover 10 meter distance that means i want to move my object from (x=5 to -x=-5) coordinate in 0.5 seconds
so, simply how can i move my object with using coordinate and time. i am stuck in it ...
thanx in advnce for help

採用された回答

Tarunbir Gambhir
Tarunbir Gambhir 2020 年 9 月 3 日
Assuming you have the time and coordinates of the object in question, you can run a loop to plot and update the X and Y coordinates at every timestep. Functions like "drawnow" and "pause" might be of help to you.
I also suggest you see the examples of animatedline for a slightly different approach.

その他の回答 (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