mobility of an object in specific distance with a specific speed

2 vues (au cours des 30 derniers jours)
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

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Animation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by