[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55880] octave misses matlab (feature?) to cre
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #55880] octave misses matlab (feature?) to create array of empty structs |
Date: |
Sun, 10 Mar 2019 17:40:35 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36 |
Update of bug #55880 (project octave):
Severity: 3 - Normal => 1 - Wish
Priority: 5 - Normal => 3 - Low
Item Group: Matlab Compatibility => WTF, Matlab?!?
_______________________________________________________
Follow-up Comment #1:
Does that also work if the struct does have one or more fields? Or only for
structs with no fields defined?
a.b = 1;
s = reshape(a, 3, 1)
Can the struct array be reshaped again?
s1 = reshape(struct(), 3, 1)
s2 = reshape(s1, 10, 1)
s3 = reshape(s1, 1, 10)
Using 'repmat' instead of 'reshape' is an easy workaround that also makes
sense in this weird case.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55880>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/