MATLAB: How to split an image and rotate quadrants

MATLAB

How to split an image into 4 quadrants and shift each quadrant one spot in the clockwise direction. Top left quadrant to top right, top right to bottom right and so on

Best Answer

If a,b,c,d are the dimensions of the quadrants (see MAT2CELL )
C=mat2cell(yourImage,[a,b],[c,d]);
newImage=cell2mat( rot90(C,-1) );