help-octave
[Top][All Lists]
Advanced

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

Re: matrix determinant calculation


From: A Scotte Hodel
Subject: Re: matrix determinant calculation
Date: Thu, 26 May 2005 12:13:23 -0500

Others have explained why the computed result is reasonable.

If you're interested in further details on numerical roundoff and the associated problems, I recommend "Matrix Computations" by Golub and Van Loan. It's an excellent text and reference. I strongly recommend it.

When testing for singularity on a computer, it's better to use the singular value decomposition (developed by Prof Golub in the 50's) than a determinant calculation. The ratio of largest singular value over the smallest singular value is called the two-norm condition of a matrix, and is a good measure of how hard it is to accurately invert a matrix on a computer. Being *close* to singular is just as bad as *being* singular, on a computer.

I hope this is useful to you.

On May 26, 2005, at 12:49 AM, Hui Zhang wrote:

hi, i am not sure the following problem is already reported or not.
It happens both version 2.1.50 (sparc-sun-solaris2.8) and
version 2.1.57 (i686-pc-linux-gnu).

octave:1> a=[1,2,3;4,5,6;7,8,9]
a =

  1  2  3
  4  5  6
  7  8  9

octave:2> det(a)
ans =  6.6613e-16

THE ANS is WRONG.


Best regards,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hui Zhang     Ph.D. Candidate & Research Assistant
VLSI System Design Lab
Department of Electrical and Computer Engineering
State University of New York at Stony Brook
Stony Brook, NY 11794-2350
Tel: 631-632-1068  Email: address@hidden
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



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