Hello, I need help putting all of the i, xi, and Err values in a table with the column headers "Iteration Number", "xi", and "Error".
% 4)Use Newton Raphson's method with intial guess of 4.5
% to find one of the roots. The stop condition is error<0.1%.
% part
%Err=relative approx error
%xi=initial guess
%y=function
%der=derivative
%i=iteration number
fprintf(' \n 4) Newton Raphsons Method \n')fprintf(' \n a) Initial guess of 4.5 \n')Err=1;xi=4.5;i=0;while Err>.001 y=(0.5*xi.^3)-(4*xi.^2)+(6*xi)-1; der=1.5*xi.^2+8*xi+6; xii=xi-(y/der); Err=abs((xii-xi)/(xii)); xi=xii; i=i+1;enddisp('Root is');disp(xi);disp('Relative Approximation Error');disp(Err);
Best Answer