octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #48807] new gsvd function is incompatible w/Ma


From: Nir Krakauer
Subject: [Octave-bug-tracker] [bug #48807] new gsvd function is incompatible w/Matlab
Date: Wed, 17 Aug 2016 17:14:22 +0000 (UTC)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17

Follow-up Comment #4, bug #48807 (project octave):

It looks like there are differences between Matlab and LAPACK in how GSVD is
defined. This is alluded to vaguely in both Matlab's [1] and Octave's [2]
documentation.

An interface to LAPACK's GSVD routines is good to have available, regardless
of what Matlab is doing.

As far as recovering Matlab's form, we can do that (up to the ordering of
singular values and vectors, which seems to be consistently the opposite) for
at least their Examples 1 and 2 with


[U, V, C, S, X, R] = gsvd (A, B);
X = (R / X)';
[m, n] = size(A);
if m > n
  C = [C; zeros(m-n, n)];
elseif m < n
  C = [C zeros(m, n-m)];
  S0 = S; S = eye(n); S(1:m, 1:m) = S0;
endif



[1] cf.
https://groups.google.com/forum/#!topic/comp.soft-sys.matlab/aBgSZNTBcxU
[2] "Other authors, like S. Van Huffel, define this transformation as the
simulatenous diagonalisation of the input matrices, this can be achieved by
multiplying x by the inverse of [I 0; 0 r]."

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48807>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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