help-octave
[Top][All Lists]
Advanced

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

chol: matrix not positive definite


From: Pascal A. Dupuis
Subject: chol: matrix not positive definite
Date: Mon, 16 Aug 2004 09:50:51 -0500
User-agent: Mutt/1.5.6+20040722i

Hello,

I generate a spare matrix X the following way:

X=[ C0 0  0  0  0
    C1 C0 0  0  0
    C2 C1 C0 0  0
    ...
          C2 C1 C0]

with a size of N, N-2 (N >> 2), and C0+C1+C2=0; ||(C0,C1,C2)|| = 1.

then I compute:

xinv = inv(X.'*X);
H = chol(xinv);

which results in:  chol: matrix not positive definite

But by construction the matrix should be positive definite, as
range(X)=N-2. OTOH, X is also badly conditionned:

[dummy, rcond]=inv(X.'*X);
rcond =  1.0498e-10


If I check the eigenvalues of X.'*X, they are all  > 0, although some
of them are very small. (~= 1e-10). So, is it a problem of numerical
inaccuracy in the computation of chol ? Or should I instead compute 
H = chol(pinv(X.'*X)) 

TIA

Pascal Dupuis

-- 
Dr. ir. Pascal Dupuis
K. U. Leuven, ESAT/ELECTA (formerly ELEN):  http://www.esat.kuleuven.ac.be/
Kasteelpark Arenberg, 10; B-3001 Leuven-Heverlee, Belgium
Tel. +32-16-32 10 21 -- Fax +32-16-32 19 85



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