We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 764dc6e commit 8c22959Copy full SHA for 8c22959
jdict.m
@@ -334,7 +334,11 @@
334
elseif (isstruct(val))
335
% check if struct array - if so, get field from all elements
336
hasfield = isfield(val, onekey);
337
- if (numel(val) > 1 && hasfield)
+ if (numel(val) == 0)
338
+ % empty struct array - track path for <= assignment
339
+ val = [];
340
+ trackpath = [trackpath '.' escapedonekey];
341
+ elseif (numel(val) > 1 && hasfield)
342
% struct array - extract field from all elements
343
val = {val.(onekey)};
344
if (all(cellfun(@isnumeric, val)) && all(cellfun(@(x) isequal(size(x), size(val{1})), val)))
0 commit comments