Fredrik Lingvall wrote:
>   
>> I don't know the numerical details of the different methods (e.g.  
>> chol2logdet vs. qr2logdet). In a similar way, I don't know if I should  
>> invert a matrix using SVD or QR. I really love that when I compute the  
>> inverse of a matrix using 'inv', Octave chooses the best method (or at  
>> least it tries to). I'd prefer if a 'logdet' function chose the best  
>> method (chol2logdet, qr2logdet, lu2logdet,...) by looking at some  
>> matrix characteristics. If this is possible then I'd doubt that the  
>> 'logdet' function would be a simple one-liner.
>>   
>>     
> Yes that would be preferable but I don't think Octave (3.0.0) keeps
> track of if the matrix is symmetric (pos def), at least a test I did
> with for example,
>   

A = diag(1:4,1) + 10*eye(5) + diag(1:4,-1);
matrix_type (A)
ans = Positive Definite
b = A \ ones(5,1)
b =

   0.092340
   0.076598
   0.070842
   0.046128
   0.081549

matrix_type (A)
ans = Positive Definite

Octave both tracks and uses the positive definiteness of a matrix to
accelerate its calculations. Note that before using the "\" operator you
do know for sure that the matrix is positive definite as the test for a
positive definite matrix is a low cost one and if the cholesky
factorization fails the positive definite flag is removed and the matrix
is treated with an LU decomposition.

D.

-- 
David Bateman                                [EMAIL PROTECTED]
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to