[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55880] octave misses matlab (feature?) to cre
From: |
A.R. Burgers |
Subject: |
[Octave-bug-tracker] [bug #55880] octave misses matlab (feature?) to create array of empty structs |
Date: |
Sun, 10 Mar 2019 17:59:06 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299 |
Follow-up Comment #2, bug #55880 (project octave):
this script:
% script b55880.m
ver = version
s1 = reshape(struct(), 3, 1)
s2 = reshape(s1, 10, 1)
s3 = reshape(s1, 1, 10)
a.b = 1
a31 = reshape(a, 3, 1)
produces this:
ver = '9.5.0.1049112 (R2018b) Update 3'
s1 = 3×1 struct array with no fields.
s2 = 10×1 struct array with no fields.
s3 = 1×10 struct array with no fields.
a = struct with fields:
b: 1
Error using reshape
To RESHAPE the number of elements must not change.
Error in b55880 (line 7)
a31 = reshape(a, 3, 1)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55880>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/