Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all
- close all
- x=-6:2;
- fx=abs(x+2);
- p=linspace(-6,2,13);
- for N=4:11
- punkty=abs(p+2);
- subplot(3,3,N-3)
- plot(x,fx,'r');hold on;
- plot(p,punkty,'ob');hold on;
- cN=polyfit(p,punkty,N);
- pN=polyval(cN,x);
- plot(x,pN,'-g');
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement