bugGNU Octave - Bugs: bug #32346, circshift of identity matrix...

 
 

bug #32346: circshift of identity matrix shifts in wrong direction

Submitter:  None
Submitted:  Thu 03 Feb 2011 11:58:22 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Tom Tetzlaff Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.2.3
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 06 Feb 2011 10:54:45 AM UTC, comment #3: 

I checked in the change as it seems right to me and fixes the reported problem.

http://hg.savannah.gnu.org/hgweb/octave/rev/ca1190196d26

John W. Eaton <jwe>
Group administrator
Fri 04 Feb 2011 08:29:47 PM UTC, comment #2: 

OK, I took another look and I'm attaching a proposed patch.

Jaroslav, will you please comment on this change?

(file #22606)

John W. Eaton <jwe>
Group administrator
Fri 04 Feb 2011 06:50:09 AM UTC, comment #1: 

The reason there is a difference is that in Octave, eye(3) creates a diagonal matrix object but [1,0,0;0,1,0;0,0,1] creates a full matrix.  The diagonal matrix type provides lower memory use and improved speed for some operations, but you have uncovered a bug in the  implementation.

I'm adding the author of the diagonal and permutation matrix objects to the CC list for this report.

Jaroslav, can you please take a look at this problem?

John W. Eaton <jwe>
Group administrator
Thu 03 Feb 2011 11:58:22 PM UTC, original submission:  


circshift(eye(3),1)

This gives different result (shifts in opposite direction) compared to octave 3.0 and matlab

Also, it shifts in the opposite direction from:

circshift([1 0 0;0 1 0;0 0 1],1)

but, the input is just an explicit 3x3 identity matrix

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #22606:  diffs.txt added by jwe (1KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by jwe
  • -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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-02-21 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2011-02-04 jwe Attached File- Added diffs.txt, #22606
    2011-02-04 jwe Carbon-Copy- Added highegg

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code