Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function new121121()
- x=[1 2 3 4 5 6 7 8 9 10];
- y=[1 28 6 23 15 6 7 2 1 4];
- plot(x,y,'ro');
- holdon;
- n=2;
- p=polyfit(x,y,n);
- y1=polyval(p,x);
- plot(x,y1,'b');
- holdoff;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement