help-octave
[Top][All Lists]
Advanced

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

Re: matrix singular to machine precision, rcond = nan


From: Quentin Spencer
Subject: Re: matrix singular to machine precision, rcond = nan
Date: Wed, 24 May 2006 14:03:54 -0500
User-agent: Thunderbird 1.5.0.2 (X11/20060501)

From:MOUNIER Stephane, address@hidden <mailto:address@hidden>
Hi, I use octave (version 2.9.5 on FC5) on several computer and I encounter the following problem : I have two matrix (in attach): R = 1.4364e-03 -2.0151e-02 -3.6360e-02 -3.8176e+01 -7.6175e+02 -3.8178e+03 -4.6178e+03 and T = 2.8900e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.8900e+00 0.0000e+00 1.0976e+02 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0876e+02 0.0000e+00 0.0000e+00 1.9000e+02 0.0000e+00 0.0000e+00 0.0000e+00 1.8900e+02 0.0000e+00 0.0000e+00 0.0000e+00 1.8900e+05 0.0000e+00 0.0000e+00 1.8900e+05 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 3.7710e+06 0.0000e+00 3.7710e+06 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.8900e+07 1.8900e+07 2.0200e-01 1.1624e+01 2.0200e+01 2.0200e+04 4.0304e+05 2.0200e+06 2.4433e+06 I want to make this operation : R/T When I use the computer 1 the program run normally with warning, but when I use the computer 2 the program hang with the following message : warning: matrix singular to machine precision, rcond = nan warning: attempting to find minimum norm solution I try to find why in the FAQ but I did not succes. Does anyboby can help me to solve this enigma ? S. Mounier # Created by Octave 2.9.5, Wed May 24 17:24:03 2006 CEST <address@hidden> # name: R # type: matrix # rows: 1 # columns: 7 0.00143642202020202 -0.020150943907456 -0.0363597979797981 -38.1761817979799 -761.749428406801 -3817.79818179799 -4617.7888089691 # Created by Octave 2.9.5, Wed May 24 17:23:37 2006 CEST <address@hidden> # name: T # type: matrix # rows: 7 # columns: 7 2.89 0 0 0 0 0 1.89 0 109.758148156723 0 0 0 0 108.758148156723 0 0 190 0 0 0 189 0 0 0 189001 0 0 189000 0 0 0 0 3771046.7752912 0 3771045.7752912 0 0 0 0 0 18900001.0000001 18900000.0000001 0.202 11.6238867342106 20.2 20200 403042.987623715 2020000.00000001 2443276.01351046


I tried this on FC5 on two different computers without any warnings. However, having said that, your matrix _is_ ill-conditioned. The output of sort(eig(T)) is:
 1.0e+07  *

 0.000000100000000
 0.000000302137594
 0.000011704216508
 0.000020683296244
 0.020554566822230
 0.412721737240821
 2.097053649981594


So, there is a spread in the eigenvalues of about 7 orders of magnitude, so this is very close to singular. In fact, you could be seeing different results if you cut and paste such a matrix into octave when it wasn't entered that way originally. Also, are you using the same lapack libraries on all of the computers? In addition to the standard Fedora lapack, there is also atlas, which might be computing rcond differently.

-Quentin



reply via email to

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