bugGNU Octave - Bugs: bug #36904, function rank throws exception on...

 
 

bug #36904: function rank throws exception on non square matrices

Submitter:  None
Submitted:  Fri 20 Jul 2012 04:03:50 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Duplicate Assigned to:  None
Originator Name:  rnestler Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.2
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 20 Jul 2012 04:26:01 PM UTC, comment #1: 

This seems like a bug in LAPACK:

http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg01219.html

It's also been reported here before as bug #35596.

Btw, non-square matrices can have an SVD. That's the whole point of having an SVD instead of eigenvalue decomposition, to have something that works for non-square matrices.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Fri 20 Jul 2012 04:03:50 PM UTC, original submission:  

When using the function rank on non square matrix the following error gets thrown:


octave:20> rank([1 2 3], [0 0 0])
 ** On entry to DORGLQ parameter number  5 had an illegal value
error: svd: exception encountered in Fortran subroutine dgesvd_
error: called from:
error:   /usr/share/octave/3.6.2/m/linear-algebra/rank.m at line 52, column 11


This also happens for example with rank([1 2 3]) or rank([1,0,0]
).
Using the same in matlab gives the correct result '1'

It probably has something to do with the fact that rank needs the singular values to calculate the rank, which can only be calculated for square matrices.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-07-20 jordigh Dependencies- Depends on bugs #35596
    2012-07-20 jordigh StatusNone Duplicate
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code