In this program, I have done with animated line plot, here how can i add text only when the line reaches to end or in some middle point. how can i do this?
clear allclose allclcfigureh = animatedline('linewidth',2);axis([1 7 1 7])axis ijgrid onx=1:4;n = 100;xx=linspace(x(1),x(end),n);y = [1 1 2 1];yy = interp1(x,y,xx);for ci=1:n addpoints(h,xx(ci),yy(ci)); pause(0.03); drawnow end
Best Answer