bugGNU Octave - Bugs: bug #55880, Octave does not allow reshaping...

 
 

bug #55880: Octave does not allow reshaping empty scalar struct to empty struct array (Matlab Compatibility)

Submitted by:  A.R. Burgers <arb>
Submitted on:  Sun 10 Mar 2019 09:26:01 PM UTC  
 
Category:  Interpreter Severity:  1 - Wish
Priority:  3 - Low Item Group:  WTF, Matlab?!?
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 10 Mar 2019 09:59:06 PM UTC, comment #2:

this script:

produces this:

A.R. Burgers <arb>
Sun 10 Mar 2019 09:40:35 PM UTC, comment #1:

Does that also work if the struct does have one or more fields? Or only for structs with no fields defined?

Can the struct array be reshaped again?

Using 'repmat' instead of 'reshape' is an easy workaround that also makes sense in this weird case.

Mike Miller <mtmiller>
Project Administrator
Sun 10 Mar 2019 09:26:01 PM UTC, original submission:

matlab has a rather surprising, I think undocumented, way to create an array of empty structs:

matlab output:

A.R. Burgers <arb>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by arb (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-10 rik5 StatusNone => Confirmed
        Summaryoctave misses matlab (feature?) to create array of empty structs => Octave does not allow reshaping empty scalar struct to empty struct array (Matlab Compatibility)
    2019-03-10 mtmiller Severity3 - Normal => 1 - Wish
        Priority5 - Normal => 3 - Low
        Item GroupMatlab Compatibility => WTF, Matlab?!?

    Back to the top


    Powered by Savane 3.4