MATLAB: Split a cell matrix into sub-matrices

cellMATLABmatrixmatrix manipulationStatistics and Machine Learning Toolbox

Hello,
Please help me with the following:
Consider a 3×1 cell matrix called C, where
each cell element contains matrices with different number of rows, for example:
C{1,1}=a 100×10 matrix
C{2,1}=a 20×10 matrix
C{3,1}=a 30×10 matrix
How can I extract separate different sub-matrices (maybe with a for loop)?
For example,
for i=1:3
submatrix(i)=mat2cell(C(i,1));
end
I need 3 different sub-matrices.
Thank you very much.
Pavlos

Best Answer

Hint:
>> C{1,1} = rand(100,10);
>> sub = C{1,1}( [2:4], [1:6] )
sub =
0.5576 0.4866 0.3355 0.2928 0.9422 0.0570
0.1532 0.3821 0.1126 0.8330 0.5177 0.8108
0.7899 0.6946 0.6691 0.9563 0.4559 0.6544
>>