MATLAB: How to convert column cell to row cell

cellmatrix manipulation

Hi,
For example I have a 3×1 cell matrix like this. {[1,2,3] [4,5,6] [7,8,9]}; where every element is a 1×3 matrix.
I want to convert the row cells to 3×1 column cells like this {[1;2;3] [4;5;6] [7;8;9]};
How do I do this ? Thank you.

Best Answer

Or a loop:
for k = 1:numel(C)
C{k} = C{k}.';
end
[EDITED] Accroding to your comment:
M = [1 2 3; 4 5 6; 7 8 9];
C = mat2cell(M.', 3, [1,1,1]).';
{[1;2;3];
[4;5;6];
[7;8;9]}
Or again with a simple loop:
C = cell(3, 1);
for k = 1:3
C{k} = M(k, :).';
end