how can I split the image into 3 parts in the image processing project : [filename pathname]=uigetfile('*.png','Pick the image file');

file=strcat(pathname,filename);


I=imread(file);


figure,imshow(I);


title('Input Image');


im1=I;


su=median(im1);


median=ceil(su);


disp('mean Value');


disp(median)


[row, col]=size(I);


    %mr = median(row/2); % median of rows


    mc = median(col/3); % median of columns
   
    right = I(1:mr  , (mc+1):col);



    figure,imshow(right)




  %  Back_to_original = [top_left,top_right ; bot_left,bot_right];





i expect to split the image into three parts but it is splitted into top right and left and creating mirror image