2

Let A=magic(16). Suppose I want to divide A into 2-by-2 sub-matrices and then sum them all into a 2-by-2 matrix. What should I do?

I started with

    A=magic(16);
    dim=2*ones(8,1);
    B=mat2cell(A,dim,dim);
Jie Wei
  • 191
  • 9

0 Answers0