Code covered by the BSD License  

Highlights from
Newton's method done right

Be the first to rate this file! 64 Downloads (last 30 days) File Size: 5.99 KB File ID: #33672 Version: 1.2
image thumbnail

Newton's method done right

by

 

08 Nov 2011 (Updated )

Newton's method for solving systems of nonlinear equations, including nonsquare and inconsistent

| Watch this File

File Information
Description

Newton's method for solving a system of nonlinear equations, see http://en.wikipedia.org/wiki/Newton's_method
Newton(X,F,X0) solves nonlinear system F(x)=0 by Newton's method, using the given initial approximation X0. The derivative (Jacobian) is evaluated symbolically. The iterations are performed numerically.

The included demo NewtonDemoRunMe.m shows how to run the Newton.m function. E.g., it creates a slide-show and a movie, illustrating the behavior of the iterates.

Required Products Symbolic Math Toolbox
MATLAB
MATLAB release MATLAB 7.13 (R2011b)
MATLAB Search Path
/
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
22 Oct 2012 Andrew Knyazev

The code works in Symbolic Math Toolbox 5.7 (R2011b). Previous versions of the toolbox may not support creating symbolic vectors this way. There may be other issues, too, with prior unsupported versions of the toolbox.

Comment only
22 Oct 2012 Xu

Xu (view profile)

Hey,man! X=sym('X',[2 1]); is not a valid command..... Tried your algorithm, but did not work.

Comment only
Updates
21 Nov 2011 1.1

Bug fixes in Newton.m and a new script NewtonDemoRunMe.m with examples.

06 Jan 2012 1.2

Multiple improvements and updates.

15 May 2015 1.2

added a conversion to a toolbox

Contact us