bugGNU Octave - Bugs: bug #40743, num2str fails to handle sparse...


bug #40743: num2str fails to handle sparse matrix with mixed Inf/NaN

Submitted by:  Michael Goffioul <goffioul>
Submitted on:  Fri 29 Nov 2013 02:31:54 AM UTC  
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)

You are not logged in

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


Wed 04 Dec 2013 10:18:38 PM UTC, comment #2:

I checked in a fix for max/min that returns a null sparse matrix when one of the inputs is null (http://hg.savannah.gnu.org/hgweb/octave/rev/35464baa7d99). With that in place, num2str now works correctly on the example in this bug report.

Rik <rik5>
Project Administrator
Mon 02 Dec 2013 05:35:14 PM UTC, comment #1:

I think the failure is in the max() operator for sparse matrices. It should not bother to check the dimensions of null matrices.

Some sample code:

Rik <rik5>
Project Administrator
Fri 29 Nov 2013 02:31:54 AM UTC, original submission:

The following fails in Linux and Windows (@ afeb233ea443):

Michael Goffioul <goffioul>
Project Member


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by goffioul (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 04 Dec 2013 10:18:38 PM UTCrik5StatusConfirmed=>Fixed
    Mon 02 Dec 2013 05:35:14 PM UTCrik5StatusNone=>Confirmed

    Back to the top

    Powered by Savane 3.1-cleanup1