I have an n*n matrix and I want to extract every 3 columns and keep the result in different variables.
n*n
I know that it is possible to do it in this way:
You can use:
C = mat2cell(A,size(A,1),ones(size(A,2)/3,1)*3);
It will split your matrix into subcells.
You can access the information contained by those cells with:
C{1} C{2} %and so on