Efficient way to display a walked path.
Show older comments
I have an object that has coordinates [x,y], the object moves in the x-y plane. The plane is described by a circular set of datapoints, as shown in the figure below.
I wish to display the "path" the object has taken (red) , and the current location (green).
I was thinking of displaying it something like the lower image, but any other way would be usefull too.
Any suggestions? (I'm not asking for any code :), I can figure that out on my own)

Accepted Answer
More Answers (1)
per isakson
on 23 Dec 2014
Edited: per isakson
on 23 Dec 2014
0 votes
Something looking similar to the upper diagram can be achieved with a couple of transparent pathes (handle graphic objects) on top.
See
Patches comes with a bit of learning curve. Try fill first.
 
The lower diagram can be done with a line object on top. See
R2014b came with improved graphic features. The links above ara to R2014b.
 
The key to "efficient" (fast) is to modify graphic objects, not delete and recreate objects, and not create many thousands of objects.
Categories
Find more on Annotations 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!