function x=multinewton(f,x,NumIters) %Performs multidimensional Newton's method for the function defined in f %starting with x and running NumIters times. % % Example of usage: If we wrote the example function from class, % we have the file examp.m % % Using that we would write: % x=[0;1]; %Starting guess % x=multinewton(@examp,x,3); %Do Newton's Method three times. % [y,dy]=f(x); for j=1:NumIters temp=dy\y; x=x-temp; [y,dy]=f(x); end