I was working with structs and cell array and I came across something I didn't quite understand.
If I have a struct and its transpose –
s = struct('A',{1;2;3}) % 3x1 struct
sT = struct('A',{1,2,3}) % 1x3 struct
Then using dot notation to select a single field will produce a cell array with the same dimensions either way –
d = {s.A} % 1×3 cell
dT = {sT.A} % 1×3 cell
Why aren't d and dT transposes of each other?
Best Answer