Advertisement
faenil

Untitled

Mar 11th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. function d = draw()
  2. rng = inline('1./(x.^2+1)')
  3. drng = inline('(-2*x)./((x.^2+1).^2)')
  4.  
  5. xs = [-5:1:5];
  6. xss2 = [-5:0.1:4.9];
  7. xss = [-5:0.1:5];
  8.  
  9.  
  10. poly = polyinterp(xs, rng(xs), xss);
  11. % piece = piecelinear(xs, rng(xs), xss2);
  12. hrm = hermite(xs, rng(xs), drng(xs), xss);
  13.  
  14. % xss, poly, 'y', xs, rng(xs), 'or', xss2, piece, 'g',
  15. plot(xss, hrm, 'b')
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement