octave-maintainers
[Top][All Lists]
Advanced

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

Re: A plea for gsvd


From: David Bateman
Subject: Re: A plea for gsvd
Date: Thu, 04 May 2006 10:17:52 +0200
User-agent: Mozilla Thunderbird 1.0.6-7.6.20060mdk (X11/20050322)

Pascal Dupuis wrote:

>On Sat, Apr 22, 2006 at 06:33:07PM +0200, David Bateman wrote:
>
>  
>
>>There were a couple of very simple bugs in your code that I fixed (size
>>of arg to dggsvd and number of F77 args incorrect), fixing that the code
>>now appears to work correctly and not seg-fault. Can you check. Also the
>>help of the gsvd function needs to be updated as it references svd and
>>in particular suggests using "svd(hilb(3))" as an example. Could you
>>update this.
>>
>>    
>>
>
>Hello,
>
>revised code included. This one works.
>
>Some rought points:
>- the doc
>- according to dggsvd.f doc, the purpose is to get
>   U���*A*Q = D1*( 0 R ),    V���*B*Q = D2*( 0 R )
>  As the function also computes R, I added a 6th output argument to
>  return R as well. This only works if  M-K-L >= 0 (see the doc),
>  otherwise part of R is stored in B
>- there are two formulations, this one and another as explained at the
>  end of the doc, U���*A*X = diag(alpha_i),   V���*B*X = diag(beta_i), but
>  the 'X' in the latter case requires to compute Q*[ I   0; 0 R]. X is a
>  factor which simultaneously diagonalise A and B, and is not
>  orthogonal. Which one to choose ?
>- in the case of 1 output arg, returns the extended singular values
>  alpha_i/beta_i, infinite values not being considered as
>  problematic. If B is invertible, they are the singular values of A*inv(B)
>
>Best regards
>
>Pascal
>
>  
>
Pascal,

There was still a few bugs in this code, whch I fixed up. Basically, I
don't think there is a gsvd funtion in the core of Matlab and so this is
likely to always be an add on package. Pending the inclusion of the
package manager and the repackaging of all of the octave-forge code,
I've committed your gsvd function with a couple of bug fixes to
octave-forge/main/linear-algebra.

I'd suggest you check the code as I committed it, but the publc CVS
server for sourceforge is 1) not in sync with the developer CVS and 2)
seems to be down at the moment. So the only way to check the code is
against the developer CVS.. So find attached a tar of the
main/linear-algebra directory of octave-forge that includes your code.

Regards
David

-- 
David Bateman                                address@hidden
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

Attachment: linear-algebra.tar.bz2
Description: BZip2 compressed data


reply via email to

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