I'm working on matlab 2014, I have a matrix 5124x2 and I want to extract all the 2562 square matrices. I found that the unique solution is to use mat2Cell, but it doesn't work for me. I don't really need a cell array at the end, what I want is just all the square matrices
%example of data A = rand(5124,2); C = mat2cell(A,2,2*ones(2562,1));
I get the following error :
Error using mat2cell (line 106) Input arguments, D1 through D2, must sum to each dimension of the input matrix size, [5124 2].'
Can you help me please ? Thanks