Good Day,
What is the best way to preallocate for a nested struct? I'm currently looping as follows but looking around it doesn't seem the way to go:
for i = 1:n for j = 1:x Field.SubField(i).Element(j).X = zeros(3,1) Field.SubField(i).Element(j).Y = zeros(3,1) Field.SubField(i).Element(j).Z = zeros(3,1)endend
Best Answer