From: Deb Gruner on
when I call inv() for a matrix in matlab what method is being used to calculate the matrix inverse? does it make a difference in accuracy of the answer if i use LU decomposition or if I use Gauss Jordan elim. in
From: us on
"Deb Gruner " <gsarah10(a)aol.com> wrote in message <i2kdsu$kt8$1(a)fred.mathworks.com>...
> when I call inv() for a matrix in matlab what method is being used to calculate the matrix inverse? does it make a difference in accuracy of the answer if i use LU decomposition or if I use Gauss Jordan elim. in

you're entering treacherous grounds

http://blogs.mathworks.com/loren/2007/05/16/purpose-of-inv/

also, search CSSM for the very(!) many threads dealing with this eval INV...

us
From: Deb Gruner on
so....what method is being used in inv() all it says is alt opts for ppl who dont wanna use inv
From: Walter Roberson on
Deb Gruner wrote:
> so....what method is being used in inv() all it says is alt opts for ppl
> who dont wanna use inv

doc inv

.....

"For inputs of type double, inv uses the following LAPACK routines to compute
the matrix inverse:

Real DLANGE, DGETRF, DGECON, DGETRI"


LAPACK source can be located without much difficulty.
From: Kevin Ratelle on
What do you want to do exactly ??

Cause if u want to solve a linear system for example, and you want to save time (cause inv() is VERY slow), just use
A\B instead of inv(A)*B or C/A instead of C*inv(A).

I dont know wich method is used in inv(), but i used LU decomposition and it's accurate. It's still usually slower than just the 'backslash', unless u have to compute A\b for many bs. Then its useful because once the matrix A is decomposed, time to compute solution is quite short.

Kevin
 |  Next  |  Last
Pages: 1 2
Prev: Matlab GUI help
Next: file names