Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. function new121121()
  2. x=[1 2 3 4 5 6 7 8 9 10];
  3. y=[1 28 6 23 15 6 7 2 1 4];
  4. plot(x,y,'ro');
  5. holdon;
  6.  
  7. n=2;
  8. p=polyfit(x,y,n);
  9. y1=polyval(p,x);
  10. plot(x,y1,'b');
  11.  
  12. holdoff;
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement