mobility of an object in specific distance with a specific speed

2 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

Tarunbir Gambhir
Tarunbir Gambhir am 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.

Weitere Antworten (0)

Kategorien

Mehr zu Animation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by