Fixed point iteration Method Code.

function [  ] = ImprovedNewton(  )
syms x;
f=x^3 - x - 1;
g=x^3-1;
p0=1;
p=[];
p1=0;
if((subs(diff(g,x),1)>1)&&(subs(diff(g,x),2)>1))
disp('Does not Converge');
else
disp('Does Converge');
end
for i=1:4
p1 =subs(g,p0);
p0=p1;
p(i) = p1;
end
p
end

Comments

Popular Posts