MATLAB: Array of structures in matlab

array of structure in matlab

how to create array of structure,and array contains 100 element. i want to sort array on the basis of second field of array.

Best Answer

YourStructureName(100) = struct('firstfield', [], 'secondfield', []);
And there you have a struct array of 100 elements, each of which has two fields.