I have a structure array in which every value is a number, I would like to concatenate these structures into a single one.
Example:
S is structure array and every element has the same structure
S(1).a = 1
S(1).b.c = 1
S(1).b.d = 2
S(2).a = 2
S(2).b.c = 3
S(2).b.d = 4
cat(S) should be a structure 'CAT' with fields :
CAT.a = [1 2]
CAT.b.c = [1 3]
CAT.b.d = [2 4]