newt (Scripts) Publisher's description
from Gabriel Frangakis
Newt executes a generalized Newton's method that is applicable functions of multiple variables
Newt executes a generalized Newton's method that is applicable functions of multiple variables. There must be the same number of subfunctions, variables, and initial guesses (one for each variable). There are only 46 lines of executable code.
The first input of newt must be the tolerance you desire. This must be a non-negative real number. The next inputs must be guesses, variables, and equations. They should be entered in that order and the guesses and variables should agree in order. For example, if you enter your variables in the order y,z,x, your guesses must be entered as y guess, z guess, and x guess. Variables and equations must be entered as strings. Equations should be written explicitly i.e. instead of 2x^2, you write 2*x^2.
Generalized Newton's Method:
Newton's method typically appears in the form
f(xo)+(x-xo)f'(xo)=0, where xo is the initial guess and x is what is being solved for. When generalized to a vector function F, this becomes
F(xo)+h[D(F(xo))]=0, where xo is a vector of n number of initial guesses, F is a vector function with n subfunctions, h is a vector that represents the change from the initial guess to the estimation, and DF is the jacobian matrix of F. Now one must simply solve the equation [DF(xo)].h=-F(xo) for h and add this to their old guess, xo.
The screen shot illustrates newt working on one and two variables, and shows the value of pi/2 for comparison with the first example (they are the same to 16 digits). Also note the polynomial example.
Thank you Dr. Paul Bamberg for teaching me the generalized method.
Developed on MATLAB 2010, tested to work on at least as far back as 2008.
System Requirements:MATLAB 7.10 (2010a)
Program Release Status: New Release
Program Install Support: Install and Uninstall