bugGNU Octave - Bugs: bug #41567, qr fails with two matrix inputs

 
 

bug #41567: qr fails with two matrix inputs

Submitted by:  Nir Krakauer <nir_krakauer>
Submitted on:  Wed 12 Feb 2014 01:45:41 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Patch SubmittedAssigned to: None
Originator Name: Nir KrakauerOpen/Closed: Open
Release: 3.6.2Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 12 Sep 2014 02:00:44 PM UTC, comment #4:

I'm starting to think that my patch went unnoticed. That is why I'm pinging, as I was suggested to do on IRC.

Any feedback would be much appreciated.

Massimiliano Fasi <mfasi>
Sun 09 Mar 2014 04:11:13 PM UTC, comment #3:

I have submitted a patch that should fix the bug, with relative tests.

(file #30836)

Massimiliano Fasi <mfasi>
Thu 13 Feb 2014 05:50:42 PM UTC, comment #2:

The expected behavior, as per both the Octave and Matlab documentation, is to return Q'*B if B is a matrix, regardless of whether A is sparse.

Nir Krakauer <nir_krakauer>
Thu 13 Feb 2014 05:42:40 PM UTC, comment #1:

Confirmed in version 3.8.0, although I am not sure what the expected behavior is here. The code for the qr function only uses the B argument if A is sparse. If A is not sparse, the second argument serves the same purpose as the documented '0' argument regardless of its value. Does the behavior or the documentation need fixing?

Mike Miller <mtmiller>
Project Member
Wed 12 Feb 2014 01:45:41 PM UTC, original submission:

if, for example,
A = randn(3, 3); B = randn(3, 2);

[Q, R] = qr (A, 0);

works as expected, returning a QR decomposition with QR = A.

According to the documentation,

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

should return C = Q'*B -- but it actually just returns C = Q, which is quite different.

Nir Krakauer <nir_krakauer>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #30836:  bugfix_41567.patch added by mfasi (7kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by mfasi (Updated the item)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by nir_krakauer (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 18 Mar 2014 02:25:18 PM UTCjordighStatusNeed Info=>Patch Submitted
    Sun 09 Mar 2014 04:11:13 PM UTCmfasiAttached File-=>Added bugfix_41567.patch, #30836
    Thu 13 Feb 2014 05:42:40 PM UTCmtmillerCategoryNone=>Octave Function
      StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup