I have a Matlab struct from which I would like to extract data.
I have written a few lines of code which does the job, but I am interested in a less cumbersome procedure using curly braces. How can I do this?
My code is copied below:
area = table2array(cell2table({result2.Area}))';
area = area';
centroid_coordinates = table2array(cell2table({result2.Centroid}));
centroid_coordinates = reshape(centroid_coordinates, 2, length(result2))';
bounding_box = (table2array(cell2table({result2.BoundingBox})))';
bounding_box = reshape(bounding_box, 4, length(result2))';
