bugGNU Octave - Bugs: bug #52854, [octave forge] (communications)...

 
 

bug #52854: [octave forge] (communications) matintrlv.m doesn't work with matrices + fix

Submitter:  None
Submitted:  Wed 10 Jan 2018 08:13:37 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 4.2.1
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 10 Jan 2018 08:13:37 AM UTC, original submission:  

The current implementation of matintrlv produces an error for matrices with the number of rows equal to nrows*ncols, even though it should work.
The error message "DATA must have NCOLS*NROWS rows" is given.
To fix this issue, one can simply replace line 46 of the original code.
Original code: +verbatim+ if (length (data) != Nrows*Ncols) -verbatim-
Fixed code: +verbatim+ if (length (data(:,k)) != Nrows*Ncols) -verbatim-

The bug can easily be reproduced by:
matrix = ones(4,6);
matintrlv(matrix,2,2);

The erroneous behaviour is caused by the wrong if statement. Matintrlv should work column-wise for matrices, but the if statement looks at the whole matrix instead of the current column, which produces an error message and the code execution is stopped.
The rest of the code works just fine.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by siko1056 (Updated 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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-22 mtmiller Carbon-CopyRemoved mtmiller -
    2018-07-02 jwe Summary[octave-forge] (communications) matintrlv.m doesn't work with matrices + fix [octave forge] (communications) matintrlv.m doesn't work with matrices + fix
    2018-01-10 siko1056 Summarymatintrlv.m doesn't work with matrices + fix [octave-forge] (communications) matintrlv.m doesn't work with matrices + fix
        Carbon-Copy- Added mtmiller
    2018-01-10 mtmiller Carbon-CopyRemoved -email is unavailable- -
    2018-01-10 mtmiller Carbon-CopyRemoved 80942 -
    2018-01-10 mtmiller Originator NameMike Miller
        Originator Email-email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code