bugGNU Octave - Bugs: bug #43113, Vertically concatenating elements...

 
 

bug #43113: Vertically concatenating elements of cell with empty cs-list gives error

Submitted by:  Philipp Kutin <pkutin>
Submitted on:  Sun 31 Aug 2014 12:40:59 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Wed 31 Dec 2014 07:21:59 PM UTC, comment #6:

Fixed on the development branch in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/e5a78897be9e). Closing report.

Rik <rik5>
Project Administrator
Tue 30 Dec 2014 12:07:42 AM UTC, comment #5:

Matlab says:

>> x = {''}


x =

{''}

Michael Godfrey <godfrey>
Project Member
Mon 29 Dec 2014 10:57:33 PM UTC, comment #4:

Another Matlab test:

Does this produce an empty cell or a 1x1 cell with an empty entry?

Rik <rik5>
Project Administrator
Mon 29 Dec 2014 07:52:48 PM UTC, comment #3:

Oh boy, Matlab compatibility. Can I get a few more examples run? Maybe easiest to invoke 'diary on' before executing all these and then just upload the file rather than trying to use verbatim notation.

Rik <rik5>
Project Administrator
Mon 29 Dec 2014 05:09:11 PM UTC, comment #2:

MY Matlab R2009b says:

>>z = cell(5,4,3,0,2);
>>{1,2,3; z{:}; 4,5,6 }


ans +

[]] [2] [3]
[4] [5] [6]

>>

Michael Godfrey <godfrey>
Project Member
Mon 29 Dec 2014 04:41:04 PM UTC, comment #1:

Confirmed. I think the general summary rule is that Matlab will allow the concatenation of any empty value because it simply removes it.

Could you try a slight variation of your original test where the empty cs-list is in the middle of the construction?

Rik <rik5>
Project Administrator
Sun 31 Aug 2014 12:40:59 PM UTC, original submission:

In MATLAB, the following is valid:

As you can see, the cell array whose elements are unpacked doesn't even have to have a size consistent with the target cell, such as 0-by-3 in the above example. This makes sense, as that information presumably isn't present in a cs-list any more.

In contrast, here's the current Octave behavior:

Philipp Kutin <pkutin>

 

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

Attach File(s):
   
   
Comment:
   

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 godfrey (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by pkutin (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 31 Dec 2014 07:31:19 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Mon 29 Dec 2014 04:41:04 PM UTCrik5StatusNone=>Confirmed
      SummaryVerticaly concatenating elements of cell with empty cs-list gives error=>Vertically concatenating elements of cell with empty cs-list gives error

    Back to the top


    Powered by Savane 3.1-cleanup1