How can I declare an array to append structures to it

  Kiến thức lập trình

When I do this, Matlab R2022b says “Conversion to double from struct is not possible.”

for i = 1:length(my_array)
    myArrayOfStructures(end+1) = functionReturningStructure( my_array{i} )
end

I guess my declaration of myArrayOfStructures is missing, but I can’t figure out how to write it.

LEAVE A COMMENT