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

## [Octave-bug-tracker] [bug #58944] [z, r, p]=qr(a, b) unexpectedly return

 From: Rik Subject: [Octave-bug-tracker] [bug #58944] [z, r, p]=qr(a, b) unexpectedly returns z as q instead of q' * b Date: Thu, 13 Aug 2020 17:38:32 -0400 (EDT) User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

```Update of bug #58944 (project octave):

Status:                    None => Need Info

_______________________________________________________

Follow-up Comment #1:

This may not be implemented in Octave.  Looking at the documentation, the
calling forms are:

-- [Q, R] = qr (A)
-- [Q, R, P] = qr (A) # non-sparse A
-- X = qr (A) # non-sparse A
-- R = qr (A) # sparse A
-- [C, R] = qr (A, B)
-- [...] = qr (..., 0)
-- [...] = qr (..., "vector")
-- [...] = qr (..., "matrix")

There is a three-output form for a single input matrix A, but there is no
listing for a three-output form with 2 inputs.  In the main body of the
documentation there is also no discussion of a form such as

[C, R, P] = qr (A, B)

It gets weirder.  Matlab won't accept

[z,r,p] = qr (a,b);

and complains that the matrices must be sparse.  If I do that with

[z,r,p] = qr (sparse(a),sparse(b));

then it works and returns a 3x1 vector.

However, Octave goes the other way.  it will accept full matrices with a
permutation output, but not sparse ones:

[z,r,p] = qr(sparse(a),sparse(b));
error: qr: Permutation output is not supported for sparse input

I think we need to decide what should happen and then go implement that.
Should the [z,r,p] form be allowed with full matrices?  Should the [z,r,p] =
qr (a,b) form work with sparse matrices?

_______________________________________________________

<https://savannah.gnu.org/bugs/?58944>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

```