Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.24 KB | None | 0 0
  1. x = linspace(-2,3);
  2. y = x.^2-3*sin(3*x+2)-1;
  3. plot(x,y)
  4. yline(0,'r--');
  5.  
  6. i = 1;
  7. p0 = -0.7;
  8. N = 10;
  9.  
  10. syms 'x'
  11. g(x) = (x.^2-3*sin(3*x+2)-1)/9 + x;
  12.  
  13. while i<N
  14.     p = g(p0);
  15.     fprintf('%f \n', double(p))
  16.     i = i+1;
  17.     p0 = p;
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement