Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. figure(1); hold on; x = 1:1000;
  2. y = x.^2;
  3.  
  4. %// Plot starts here
  5. figure,hold on
  6.  
  7. %// Set x and y limits of the plot
  8. xlim([min(x(:)) max(x(:))])
  9. ylim([min(y(:)) max(y(:))])
  10.  
  11. %// Plot point by point
  12. for k = 1:numel(x)
  13. plot(x(k),y(k),'-') %// Choose your own marker here
  14.  
  15. %// MATLAB pauses for 0.001 sec before moving on to execue the next
  16. %%// instruction and thus creating animation effect
  17. pause(0.001);
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement