Do you ever make use of non-uniform arrays of structures?
4 views (last 30 days)
Loren explained in the following comment on her blog that certain vectorized struct assignment syntax is not currently allowed because there is no guarantee that arrays of structs are uniform: http://blogs.mathworks.com/loren/2007/04/19/vectorizing-access-to-an-array-of-structures/#comment-16189
She proposes adding a new 'uniform' struct data type to permit this. Personally I'd rather enable the syntax for existing structs and error if one tries the syntax on a non-uniform array of structs, because I've never had the need to use non-uniform struct arrays as a data structure in my programming. Have you?
Jan on 20 Feb 2013
Yes, I use non-uniform structs. For a motion analysis I store different measurements in a struct array and some of the measurements contain an EMG measurement, and some don't. But of course, I do not try to apply a vectorized access to the subfields (because this would fail). So I agree that allowing this kind of access for the current structs should be valid, when for non-uniform data an error is thrown.
Sean de Wolski on 20 Feb 2013
Edited: Sean de Wolski on 20 Feb 2013
When you save a figure, it is internally stored as a *.mat file containing a scalar structure.
If you dig into this for a fancy figure, there can many instances of non-uniformity amongst the various children and their properties (since the children are not necessarily the same class). E.g:
S = load('complicatedFigure.mat'); %rename from complicatedFigure.fig
As for me: never used 'em.