bugGNU Octave - Bugs: bug #47330, mat2cell error message suffix...

 
 

bug #47330: mat2cell error message suffix doesn't match number

Submitter:  Dan Sebald <sebald>
Submitted:  Thu 03 Mar 2016 07:11:43 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 05 Mar 2016 12:00:47 AM UTC, comment #6: 

Thanks, another savannah bug :)

Mike Miller <mtmiller>
Group Member
Fri 04 Mar 2016 11:41:28 PM UTC, comment #5: 

Mike, did you mean to revert the status and open/closed fields, or was it just that your comment crossed paths with Rik's?


Dan, I agree that this is tiny compared with how "heavy" Octave is in general, but every bit counts.

Lachlan Andrew <lachlan>
Fri 04 Mar 2016 10:37:11 PM UTC, comment #4: 

Yes, much better if we care about i18n someday.

Mike Miller <mtmiller>
Group Member
Fri 04 Mar 2016 10:32:02 PM UTC, comment #3: 

I think the lightweight approach is sufficient.  I applied Lachlan's patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/8017ce5b2a6e).

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Fri 04 Mar 2016 08:43:11 PM UTC, comment #2: 

I thought of doing the more lightweight approach, but then I thought, What about Octave is lightweight?  Dozens of libraries, macro packages, etc., maybe I could make the suffix fairly sophisticated...  It's up to you.

Dan Sebald <sebald>
Fri 04 Mar 2016 11:26:26 AM UTC, comment #1: 

Well spotted, Dan.

A lighter-weight change is just to write "dimension 1", "dimension 2" etc., as per the attached patch.  What do you think?

(file #36546)

Lachlan Andrew <lachlan>
Thu 03 Mar 2016 07:11:43 PM UTC, original submission:  

The mat2cell mismatch error message prints out a "th" for any dimension such as 1-th, 2-th, 3-th, 4-th.

The attached patch will fix this.  For example:


octave:2> mat2cell([1],2)
error: mat2cell: mismatch on 1st dimension (1 != 2)
octave:2> mat2cell([1],1,2)
error: mat2cell: mismatch on 2nd dimension (1 != 2)
octave:2> mat2cell([1],1,1,2)
error: mat2cell: mismatch on 3rd dimension (1 != 2)
octave:2> mat2cell([1],1,1,1,2)
error: mat2cell: mismatch on 4th dimension (1 != 2)
octave:2> mat2cell([1],1,1,1,1,1,1,1,1,1,2)
error: mat2cell: mismatch on 10th dimension (1 != 2)
octave:2> mat2cell([1],1,1,1,1,1,1,1,1,1,1,2)
error: mat2cell: mismatch on 11th dimension (1 != 2)
octave:2> mat2cell([1],1,1,1,1,1,1,1,1,1,1,1,2)
error: mat2cell: mismatch on 12th dimension (1 != 2)
octave:2> mat2cell([1],1,1,1,1,1,1,1,1,1,1,1,1,2)
error: mat2cell: mismatch on 13th dimension (1 != 2)
octave:2> mat2cell([1],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2)
error: mat2cell: mismatch on 20th dimension (1 != 2)
octave:2> mat2cell([1],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2)
error: mat2cell: mismatch on 21st dimension (1 != 2)
octave:2> mat2cell([1],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2)
error: mat2cell: mismatch on 22nd dimension (1 != 2)
octave:2> mat2cell([1],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2)
error: mat2cell: mismatch on 23rd dimension (1 != 2)
octave:2> mat2cell([1],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2)
error: mat2cell: mismatch on 24th dimension (1 != 2)


Dan Sebald <sebald>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #36546:  bug_47330_mat2cell.cset added by lachlan (903B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-05 mtmiller StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-03-04 mtmiller StatusFixed Patch Submitted
        Open/ClosedClosed Open
    2016-03-04 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-03-04 lachlan Attached File- Added bug_47330_mat2cell.cset, #36546
        StatusNone Patch Submitted
    2016-03-03 sebald Attached File- Added octave-mat2cell_suffix_mismatch-djs_2016mar03.patch, #36537

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code