Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = linspace(-2,3);
- y = x.^2-3*sin(3*x+2)-1;
- plot(x,y)
- yline(0,'r--');
- i = 1;
- p0 = -0.7;
- N = 10;
- syms 'x'
- g(x) = (x.^2-3*sin(3*x+2)-1)/9 + x;
- while i<N
- p = g(p0);
- fprintf('%f \n', double(p))
- i = i+1;
- p0 = p;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement