File Exchange

image thumbnail

Iterative Methods for Linear and Nonlinear Equations

version 1.0 (23.8 KB) by

Companion Software



View License

This book provides a complete analysis of the conjugate gradient and generalized minimum residual iterations.
For a full book description and ordering information, please refer to

Comments and Ratings (6)


A S (view profile)

Came here to learn about some advanced methods for nonlinear equation solving.

1. multiple solvers did not work out of the box because of some trivial programming errors, like output arguments not set. No big deal.

2. The actual problem however seems to be that... well, actually most solvers fail for even the simplest problems. See the following code:

fun1 = @(x) -2 + x.^2;
x0 = 5;

%% newton solver:
[sol, it_hist, ierr] = nsol(x0,fun1,[1e-3, 1e-3],[40, 1, 0]);

%% globalized newton solver
[sol, it_hist, ierr] = nsola(x0,fun1,[1e-3, 1e-3],[40, 40, 0.9, 1, 20]);

%% Newton-GMRES locally convergent solver for f(x) = 0
[sol, it_hist, ierr] = nsolgm(x0,fun1,[1e-3, 1e-3],[40, 40, 0.9]);

%% Broyden's Method solver, globally convergent
[sol, it_hist, ierr] = brsola(x0,fun1,[1e-3, 1e-3],[40, 40]);

%% Broyden's Method solver, locally convergent
[sol, it_hist, ierr] = brsol(x0,fun1,[1e-3, 1e-3],[40, 40, 0]);

Here, only the classical newton solver will succeed. Even for a purely convex function as used here. There is absolutely no difficulty in getting the zero of a parabola.

Shunping Yan

pinkie li

maun budiyanto

It is very simple, so need axpand of material.

Zhonghua Liang

Ciro Raia



This update is at Mathworks' request to enable BSD licensing.

MATLAB Release
MATLAB 5.2 (R10)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video