mobility of an object in specific distance with a specific speed

1 view (last 30 days)
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

Accepted Answer

Tarunbir Gambhir
Tarunbir Gambhir on 3 Sep 2020
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.

More Answers (0)

Categories

Find more on Animation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!