Question: Create a script in MATLAB function x = Newton_method (f, df, x0, Tol, MaxIter ) % % NEWTON Newton's Method % Newton's method for finding
Create a script in MATLAB
function x = Newton_method (f, df, x0, Tol, MaxIter ) % % NEWTON Newton's Method % Newton's method for finding successively better approximations to the zeroes of a real-valued function. % % % Inputs: % f solve f(x)=0 % df derivative of f(x) % % Tol % % % Output: % X- a root of f(x)=0 % - end initial guess stopping tolerance MaxIter maximum number of iterations nit=0;%number of iterations X disp('step| disp(' while 1 | x = x0 - f(x0)/df(x0); nit=nit+1; | | break end if abs(x-x0)
Step by Step Solution
3.54 Rating (164 Votes )
There are 3 Steps involved in it
Newtons Method This script implements Newtons Method for finding successive... View full answer
Get step-by-step solutions from verified subject matter experts
