I have a matrix [x y] of size [86 86]. I want to divide this matrix into 10 sub matrix. For thr last matrix there will be shortage of coordinates but can be padded with zeros.
[x y] = size(I)
nSub = 10;
B = mat2cell(I, 2*ones(size(I,1)/2,1), 2*ones(size(I,2)/2,1))
I tried using mat2cell function but the output didn't come well. Can any one tell me where am going wrong or can I change this function