Prev: Matlab GUI help
Next: file names
From: Deb Gruner on 26 Jul 2010 12:42 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 26 Jul 2010 12:51 "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 26 Jul 2010 16:02 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 26 Jul 2010 16:04 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 26 Jul 2010 13:05
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 |