2.0
2.0 | 1 rating Rate this file 17 Downloads (last 30 days) File Size: 4.97 KB File ID: #27544
image thumbnail

Newton-Raphson Iterative Solver for Systems of Equations

by

John Fuller (view profile)

 

09 May 2010 (Updated )

An N-R iterative root-finder for systems of N equations and N unknowns.

| Watch this File

File Information
Description

For those of us who like to provide our own partial derivative sensitivity matrix. Can be used for both linear and non-linear systems.

x = nrsolve( F, dFdx, xi, tol, max_iter, c1, c2.... )

Given a system of equations F = {F1;F2;...}, defined sensitivity matrix dFdx (matlab functions allowed), and initial guess vector xi, nrsolve provides a solution vector x. Optional input constants c1, c2, etc. allow for passing variables into functions within F and dFdx.

See testnrsolve for more details.

Comments and debugging are highly appreciated.

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
20 Oct 2011 John Fuller

John Fuller (view profile)

No humor with this one :)

Comment only
12 Oct 2011 Andrew Knyazev

Incomplete description. The function is hard-coded for no more than 8 equations. Quoting the code: "Holy crap! More than 8 equations to solve??"

Updates
01 Dec 2011

Fixed bug with fprintf function upon maximum iterations reached.

Contact us