[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Inverse Matrix Function appears a bit wonky
From: |
Robert A. Macy |
Subject: |
Inverse Matrix Function appears a bit wonky |
Date: |
Wed, 03 Nov 2004 12:43:30 -0800 |
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
-------------------------------------------------------------
- Inverse Matrix Function appears a bit wonky,
Robert A. Macy <=
- Prev by Date:
OS X errors. plot, aquaterm, x11, ls, display. possibly related, possibly not.
- Next by Date:
Re: OS X errors. plot, aquaterm, x11, ls, display. possibly related, possibly not.
- Previous by thread:
OS X errors. plot, aquaterm, x11, ls, display. possibly related, possibly not.
- Next by thread:
Re: Inverse Matrix Function appears a bit wonky
- Index(es):