How can I convert an array of structures into a structure of arrays.
I currently have an array of structs of size N that the only way to access it is to call them by
var = struct(1).fieldname
Where the fieldname is referencing a array of 1xM.
When I try to call var = struct.fieldname or var = struct(:).fieldname I only get one value, while I would like to get all values.
I have tried to do struct2cell and cell2mat, but these options expand the nested array.
What I want is to call each fieldname and get a matrix of NxM.