From help-request at octave dot org Thu Nov 4 02:58:26 2004 Subject: Re: Inverse Matrix Function appears a bit wonky From: David Bateman To: "Robert A. Macy" Cc: "Dmitri A. Sergatskov" , help@octave.org Date: Thu, 4 Nov 2004 09:54:14 +0100 According to Robert A. Macy (on 11/04/04): > That's it! simply asking to return the value of rcond > allows me to catch a "bad" matrix. If you are after speed don't just ask for the condition number everytime. If you have a good expectation that the matrix isn't singular, not calculating the condition number is a speed gain. Regards David > > Thank you. > > - Robert - > > On Wed, 03 Nov 2004 14:08:34 -0700 > "Dmitri A. Sergatskov" wrote: > > Robert A. Macy wrote: > > > I tried a simple test of the inverse function using a > > "made > > > up" matrix... > > > > > > testmatrix = > > > 1 2 3 4 > > > 2 2 3 3 > > > 1 2 1 2 > > > 3 2 2 1 > > > > Your matrix is no good. Set testmatrix(4,4)=-1 and try > > again :) > > > > > What do I do to make certain octave doesn't do these > > > erroneous inverse calculations the next time I go to > > use > > > the inverse function? > > > > > > > Instead of b=inv(a), you can try [b,r]=inv(a), and check > > that r is not too small. > > > > > - Robert - > > > > Cheers, > > > > Dmitri. > > > > ------------------------------------------------------------- > Octave is freely available under the terms of the GNU GPL. > > Octave's home on the web: http://www.octave.org > How to fund new projects: http://www.octave.org/funding.html > Subscription information: http://www.octave.org/archive.html > ------------------------------------------------------------- -- David Bateman David dot Bateman at motorola dot com Motorola CRM +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------