from Newton Raphson's Methos by Zeeshan Shareef
This M File is to find the solution of any equation using the Newton Raphson Method.

Newton.m
format long
i=1;
e=input('Enter the Tolerence =');
n=input('Enter the Number of Iterations =');
p=input('Enter the First Point =');
while i<=n
    p1=p-(fun(p)/dfun(p))
    res=fun(p1)
   if abs(res)<=e
       fprintf('The root is = %i\n',p1);
       fprintf('The Number of Iterations = %i\n',i);
       fprintf('Zeeshan');
       break
   end 
    i = i+1;
    p=p1;
end

if abs(res)>e
    fprintf('The method is not Converging');
end
    
    


Contact us at files@mathworks.com