help-octave
[Top][All Lists]
Advanced

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

Re: chol: matrix not positive definite


From: Joe Koski
Subject: Re: chol: matrix not positive definite
Date: Mon, 16 Aug 2004 21:06:08 -0600
User-agent: Microsoft-Entourage/10.1.4.030702.0

on 8/16/04 7:52 PM, Henry F. Mollet at address@hidden wrote:

> N.B. I should add that the "." in the non-conjugate transpose operator has
> nothing to do with "element by element" operation as in ".*" or "./" etc.
> 
> As far as I know 
> " ' " is the conjugate transpose operator, whereas
> " .' " is the non-cojugate transpose operator.
> 
> Perhaps difficult to understand that the former (one symbol) does more than
> the latter (two symbols)?
> Henry

My Octave manual further confuses me. It says that for real arguments
(meaning real matrices?), x' and x.' are equivalent. For complex matrices,
x' is equivalent to conj(x.'), where .' gives the transpose. It appears to
me that the "safest" transpose operator to use (unless you know what you
want) is the .' operator. Can anyone confirm this?

Joe Koski

> 
> 
> on 8/17/04 6:51 AM, Geordie McBain at address@hidden
> wrote:
> 
>> Hello,
>> 
>> I think the assuredly positive Hermitian matrices should be formed
>> with X'*X rather than X.'*X
>> 
>> I don't understand the latter (dot prime star).  What does it do?
>> 
>> With A=rand(3)+1i*rand(3), A'*A is positive Hermitian but A.'*A isn't.
>> 
>> Geordie McBain
>> 
>> 
>> On Mon, 2004-08-16 at 10:50, Pascal A. Dupuis wrote:
>>> 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
>> 
>> 
>> 
>> -------------------------------------------------------------
>> 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
>> -------------------------------------------------------------
>> 
> 
> 
> 
> -------------------------------------------------------------
> 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
> -------------------------------------------------------------
> 



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