Advertisement
mdabkow

essa byku

Dec 4th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. clear all
  2. close all
  3.  
  4. x=-6:2;
  5. fx=abs(x+2);
  6.  
  7. p=linspace(-6,2,13);
  8.  
  9. for N=4:11
  10. punkty=abs(p+2);
  11. subplot(3,3,N-3)
  12. plot(x,fx,'r');hold on;
  13. plot(p,punkty,'ob');hold on;
  14. cN=polyfit(p,punkty,N);
  15. pN=polyval(cN,x);
  16. plot(x,pN,'-g');
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement