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

 
 

bug #41010: cell2mat should accept empty matrix input

Submitted by:  Felipe G. Nievinski <fgnievinski>
Submitted on:  Fri 27 Dec 2013 02:31:53 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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>
Project 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>
Project 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 File(s):
   
   
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
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by fgnievinski (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Jan 2014 02:11:41 AM UTCrik5StatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Sat 28 Dec 2013 07:30:18 PM UTCrik5StatusNone=>Need Info
      Summarycell2mat should accept empty non-cell input=>cell2mat should accept empty matrix input
    Fri 27 Dec 2013 02:31:53 AM UTCfgnievinskiAttached File-=>Added cell2mat.patch, #30102

    Back to the top


    Powered by Savane 3.1-cleanup1