# Computational convergence

G

#### Guest

I'm trying to solve a nonlinear matrix system in excel. I have a rigged
method for implementing the Newton Raphson method, but it takes time because
it has to compute N gradient vectors, invert the NxN matrix of gradients,
compute X_n+1, calculate, reset initial values, and repeat. Any thoughts on
an easy (and fast) way to do this in excel?

H

#### Harlan Grove

bangecon said:
I'm trying to solve a nonlinear matrix system in excel. I have a rigged
method for implementing the Newton Raphson method, but it takes time
because it has to compute N gradient vectors, invert the NxN matrix of
gradients, compute X_n+1, calculate, reset initial values, and repeat.
Any thoughts on an easy (and fast) way to do this in excel?
Why aren't you using Solver? It includes both Newton and Conjugate methods
for multiple variable problems, and it's implemented in binary rather than
interpretted Excel formulas, so it should be much faster (and likely also
better able to maintain precision).

More to the point, what you're doing is likely ill-suited to Excel (or any
other spreadsheet). Handling large, nonlinear systems is better done in true
math software like MatLab. If you don't want to spend money, there's also
SciLab and Octave.

G

#### Guest

As nearly as i can tell from Solver help, this is designed for scalar
targets. I'm looking to make an N-vector converge. I would much rather do
it in a program for matrix algebra, e.g. "R", which is freeware, but there
are others working with the same project that need to be able to "see" how it
is converging.

J

H

#### Harlan Grove

bangecon said:
As nearly as i can tell from Solver help, this is designed for scalar
targets. I'm looking to make an N-vector converge. I would much rather
do it in a program for matrix algebra, e.g. "R", which is freeware, but
there are others working with the same project that need to be able to
"see" how it is converging.
....

Depending on what sort of convergence you want to achieve, you could use a
scalar statistic based on your N objective functions. So if you want

(f(x,y,z),g(x,y,z),h(x,y,z))

to converge to (f0,g0,h0), you could try minimizing the scalar statistic

SUM((f(x,y,z)-f0)^2,(g(x,y,z)-g0)^2,(h(x,y,z)-h0)^2)

Difficult to be more precise without any details about what you're trying to
do.