M = moviein(50); set(gca,'nextplot','replacechildren'); for j = 1:48 plot(A(100*(j-1):100*(j+2),2)) M(:,j) = getframe; end movie(M,1,4)