mobility of an object in specific distance with a specific speed

조회 수: 2 (최근 30일)
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 CenterFile Exchange에서 Animation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by