tracing the path of a moving particle in using plot

8 views (last 30 days)
Hi, I want to track the motion of a particle from start to end by tracing its path from start to finish. The particle is moving according to a set of rules. How do I do this?

Answers (1)

Walter Roberson
Walter Roberson on 21 Jan 2016
Insufficient information about what you want the graph to look like, what information is available, whether you want to simulate the particle moving along a path.
Perhaps you want to use the new-ish animatedLine() function. Or perhaps you want to modify my code from http://www.mathworks.com/matlabcentral/answers/220473-how-can-i-use-the-plot-function-to-show-two-moving-points-with-different-velocities#answer_180901
  2 Comments
cgo
cgo on 21 Jan 2016
yes, i am sorry. i don't know how to explain it further. it is an animation, yes. as the particle moves around the screen, i want the see the trace of the path it is traveling. right now, i can see the particle moving, and that is it.
Walter Roberson
Walter Roberson on 21 Jan 2016
If you have R2014b or later, just keep adding points with animatedline
You might also want to consider comet()

Sign in to comment.

Categories

Find more on Animation in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!