Zend certified PHP/Magento developer

Data extraction from Matlab structs [migrated]

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?

I don’t have reputation to include images but here’s the imgur link for the data struct: https://i.stack.imgur.com/hx2vE.png

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))';