function fixedpoint % 0.5 is the Initial approximation %p=0.5 p=1.000000000001 %% for i=1:1:40 p=f(p) end p function y=f(x) y=x^2;