help-octave
[Top][All Lists]
Advanced

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

Re: chol problem in 2.9.5


From: David Bateman
Subject: Re: chol problem in 2.9.5
Date: Thu, 25 May 2006 21:02:48 +0200
User-agent: Mozilla Thunderbird 1.0.6-7.6.20060mdk (X11/20050322)

Quentin Spencer wrote:
> Dmitri A. Sergatskov wrote:
> 
>>octave:1> a=randn(2)
>>a =
>>
>> -0.94562   1.05567
>> -0.69245   1.99836
>>
>>octave:2> x=a'*a
>>x =
>>
>>  1.3737  -2.3820
>> -2.3820   5.1079
>>
>>octave:3> chol(x)
>>ans =
>>
>>  1.17204  -2.03238
>>  0.00000   0.98860
>>Upper Triangular
>>
>>octave:4> chol(x)
>>error: chol: matrix not positive definite
>>octave:4>
>>---
>>
>>So after calling chol a second time on the same matrix it gives an error.
>>That seems breaks chol for good for remaining of the octave session:
>>
>>octave:4> a=randn(2)
>>a =
>>
>> -0.081825   0.226121
>>  0.273070   0.446935
>>
>>octave:5> y=a'*a
>>y =
>>
>> 0.081263  0.103542
>> 0.103542  0.250882
>>
>>octave:6> chol(y)
>>error: chol: matrix not positive definite
>>octave:6>
>>
>>This is octave-2.9.5-3.fc5 rpm on x86_64 Fedora Core 5.
> 
> 
> I can't duplicate this on i386 with the same FC5 rpm. I suppose this 
> could be specific to x86_64, but I don't know why.
> Is the checking for positive definiteness done by octave or lapack?
> 
> Quentin

In Dmitri's example the positive definiteness checking is done in the
octave-forge chol.cc function. Similarly in the octave core 2.9.5+
version. Dmitri try removing the octave-forge version of chol.oct and
see if it helps. Working with the CVS or with 2.9.6 when it comes out
will then probably fix this, and be faster for the back substitution.

Regards
David



reply via email to

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