[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60274] GSVD reordering (matlab compatibility)
From: |
Leonardo |
Subject: |
[Octave-bug-tracker] [bug #60274] GSVD reordering (matlab compatibility) |
Date: |
Tue, 23 Mar 2021 07:21:33 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0 |
URL:
<https://savannah.gnu.org/bugs/?60274>
Summary: GSVD reordering (matlab compatibility)
Project: GNU Octave
Submitted by: pocker
Submitted on: Ter 23 Mar 2021 08:21:31 -03
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
Hi.
The ordering of the elements in the output of gsvd is in reverse order
compared to Matlab.
After commands
>> A = [1 1 3; 3 1 2; 2 1 1];
>> B = [2 0 1; 2 1 -1;1 0 0];
>> [U, V, X, C, S] = gsvd (A, B);
>> diag(C)
ans =
0.9968
0.6072
0.3022
while in matlab diag(C) produces 0.3022, 0.6072, 0.9968.
A simple workaround is
>> C = diag(flipud(diag(C)));
>> S = diag(flipud(diag(S)));
>> U = fliplr(U);
>> V = fliplr(V);
>> X = fliplr(X);
Side note: matrix X has wrong results. See bug #60273.
https://savannah.gnu.org/bugs/?60273
This affects, at least, v. 6.2.0 and 7.0.0 (4a516dce916c+). Both compiled from
source, debian 10.
Kind regards,
Leonardo
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60274>
_______________________________________________
Mensagem enviada pelo Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #60274] GSVD reordering (matlab compatibility),
Leonardo <=