function M2 = swapBlocks(M) 
% swap the 4 fft subblocks

[r, c] = size(M);
B11 = M(1:r/2,1:r/2);
B12 = M(1:r/2,r/2+1:r);
B22 = M(r/2+1:r,r/2+1:r);
B21 = M(r/2+1:r,1:r/2);
M2 = [B22 B21; B12 B11];
