Posted By:
31 Mar, 2013 8:41 am PDT

Implement fixed point iteration in Matlab

I want to use fixed point iteration to find the root of f = sin(sqrt(x)) -x.
My initial guess of x0 = 0.5.

The root should be: 0.7686


%fixed point iteration method
% fx = sin(sqrt(x))-x=0
x = 0.5; %initial guess
g = @(x) sin(sqrt(x));
while norm(g(x)-x)>10e-7
    x = g(x);

Please see the video
Was it useful?  

Please login to reply to this problem.

Related Problems on Fixoncloud