Question: hello, I am trying to use the newton raphson method to find the root for the provided equation and derivative of the equation. for some
% The Newton Raphson Method f = @(x) 1/sqrt(x)+2*log10((0.0002/(3.7*0.3)) +2.51/(10^5*sqrt(x))); fprime = @(x) ((-0.0000251/sqrt(x))-0.00020)/(2*x^(3/2)*(0.0000251/sqrt(x)+0.00018)); X = ; Initial Guess i = 0; Starting the number of iterations ei = 100; Begins while loop, ei=Ixi-xi-1| le - 12 - while (ei > le-5) xnew = X - (f/fprime); ei = abs(x - xnew); x = xnew; Updates x value i = i + 1; Updates iteration end 21- fprintf('The Root is : %f ',x) fprintf('No. of Iterations : %d ', i) fprintf('ei value is: %d ',ei) 23 - Command Window 1 -1 , 5 end fprintf('The Root is : %f ',x) fprintf('No. of Iterations : %d ', i) fprintf('ei value is: %d ',ei) Undefined operator '' for input arguments of type 'function_handle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
