bugGNU Octave - Bugs: bug #41010, cell2mat should accept empty...

 
 

bug #41010: cell2mat should accept empty matrix input

Submitter:  Felipe G. Nievinski <fgnievinski>
Submitted:  Fri 27 Dec 2013 02:31:53 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 02 Jan 2014 02:11:41 AM UTC, comment #4: 

I applied your patch here after updating the commit message to use the bug number (http://hg.savannah.gnu.org/hgweb/octave/rev/f09abe022c96).  Closing report.

Rik <rik5>
Group administrator
Sun 29 Dec 2013 05:15:13 PM UTC, comment #3: 

Should this behavior be restricted to --traditional?

Felipe G. Nievinski <fgnievinski>
Sun 29 Dec 2013 05:14:33 PM UTC, comment #2: 

Yes, it is Matlab's behavior:

>> cell2mat([])

ans =
     []

In fact, it seems to be so for an empty variable of any type, e.g.:

>> cell2mat(struct([]))

ans =
     []

The patch submitted should take care of these.

Felipe G. Nievinski <fgnievinski>
Sat 28 Dec 2013 07:30:18 PM UTC, comment #1: 

Do you have access to Matlab?  Is this Matlab behavior to return '[]' for '[]' input?

Rik <rik5>
Group administrator
Fri 27 Dec 2013 02:31:53 AM UTC, original submission:  

patch attached

Felipe G. Nievinski <fgnievinski>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #30102:  cell2mat.patch added by fgnievinski (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-02 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2013-12-28 rik5 StatusNone Need Info
        Summarycell2mat should accept empty non-cell input cell2mat should accept empty matrix input
    2013-12-27 fgnievinski Attached File- Added cell2mat.patch, #30102

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code