help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inverse Matrix Function appears a bit wonky


From: Ada Cheng
Subject: Re: Inverse Matrix Function appears a bit wonky
Date: Wed, 3 Nov 2004 16:00:45 -0500 (EST)

Your matrix is singular.
Ada
On Wed, 3 Nov 2004, 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

forgive the wraparound results...
testmatrixinv = inverse(testmatrix) =
-3.37769972052787e+15 4.5035996273705e+15
1.12589990684262e+15 -2.25179981368525e+15

3.37769972052787e+15 -4.5035996273705e+15
-1.12589990684262e+15 2.25179981368525e+15

3.37769972052787e+15 -4.5035996273705e+15
-1.12589990684262e+15 2.25179981368525e+15

-3.37769972052787e+15 4.5035996273705e+15
1.12589990684262e+15 -2.25179981368525e+15

inverse function merrily calculated the above inverse
matrix with no special notes.

but when I multiply the two, the results are...
testmatrixinv*testmatrix =
1 0 1 -1
0 1 0 1.5
-1 -0.5 1 1
1 0.5 0.5 0.25

which is definitely NOT the identity matrix

the testmatrix was just an arbitrary matrix to test the
process.  It is very disconcerting that the first,
arbitrary test, fails so miserably.  What happened?

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?

           - Robert -



-------------------------------------------------------------
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
-------------------------------------------------------------



============================================================================
 Ada Cheng                              address@hidden
 Assistant Professor                    http://www.kettering.edu/~acheng
 Department of Science and Mathematics
 Kettering University
 1700 West Third Avenue
 Flint, Michigan 48504-4898
 U.S.A.
============================================================================



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]