MATLAB: Pulling matrix column data out of a cell

cell arraydataindexingMATLABmatrix

I have a cell array with 29 matrices that are each 500×6 doubles. I want to take the first column of each matrix and load them into a single matrix that is 500×29. Then, I want to do this with each column, ending with 6 matrices of 500×29. I feel like theres a way to do this with a for loop I just dont know how. Help?

Best Answer

Say your Cell array is C:
D = cell2mat(C);
E = reshape(D(:),[500 29*6]);
Now every 500 by 29 chunk in E is a matrix you want.