MATLAB: How to divide 90*90 size matrix into 3*3 windows

MATLAB

i=rand(90); b=3*ones(10,1); c=mat2cell(i,b,b);

Best Answer

i=rand(90);
reshape(i,3,3,[])