Helping to Create Line Animations

3 views (last 30 days)
I want to create a line animation, but it seems not act in my Matlab software as attached image. Can you help me explaining this problem? How can I get this function?

Accepted Answer

Walter Roberson
Walter Roberson on 3 Jan 2016
animatedline was introduced in R2014b, which was after your release.
curve = line(nan,nan);
for i = 1 : length(x)
set(curve, 'xdata', x(1:i), 'ydata', y(1:i));
  1 Comment
Walter Roberson
Walter Roberson on 8 Jan 2016
You should start a new question for this.

Sign in to comment.

More Answers (0)


Find more on Animation 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!

Translated by