FiniteNewtonRoot

FiniteNewtonRoot - function Xs =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%%This function finds a numerical solution to the function (Fun) using Newtons Method. %Fun = Function of 2 variables %FunDer = symbolic derivative of Fun %Xest = trial solution for root to Fun %imax = number of iterations %Xs = output of NewtonRoot - stores all values of x
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: function Xs = NewtonRoot(Fun,FunDer,Xest,imax) Xi(1)=Xest; %Xi is couter variable that stores values of x for i=2:imax Xi(i) = Xest - feval(Fun,Xest)/feval(FunDer,Xest); Xest = Xi(i); end Xs = Xi;...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online