animating two points along different curves in one figure simultaneously in matlab

2 views (last 30 days)
I need to program the animation of two points along these paths:
t = (0:0.01:5)';
y = [0.5*t.*sin(2*pi*t) 0.3*sin(2*pi*t)]; % y coordinates of the two bodies
z = [0.5*t.*cos(2*pi*t) 0.3*cos(2*pi*t)]; % z coordinates of the two bodies
But every effort seems to be in vain. i tried comet functions, but they don't seem to be able to be plot simultaneously.
Desperately need help!
thanks!

Answers (1)

Image Analyst
Image Analyst on 25 Feb 2015
Have you tried the animatedline function, new to R2014b?

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!