MATLAB: Animating a sine wave movie

getframehandlesmovie

Hi guys I would like to know how to make a movie of a sine wave using handle graphics and for each frame a for loop with getframe
a = -1; z = 0:pi/1000:2*pi; y = a*sin(z)

Best Answer

See my attached demo. Just change the surf() call to plot() and it should work.
Related Question