Concatenate array

IDCC-16
TitleDo not use brackets to concatenate struct array field values or object array property values.
PriorityMandatory
Severity level3
DescriptionPerforming concatenation on an expanded array is not supported by the Coder before MATLAB R2020b.
RationaleCompatibility

Avoid:

a = [myStruct(:).b];

Instead use:

len = numel(myStruct);
a   = zeros(len);

for iMyStruct = 1:len
  a(iMyStruct) = myStruct(iMyStruct).b;
end