How to Show modified image in MATLAB.

Hi,

I am looking for a method which help me to showing modified patches of image in matlab into the original image. I select random patches from an image half of patches i brighten and half of patches i darken and when i write “imshow(A)” it show me the original image not the modified one. I have required a method which show me the modified patches pasted into their original image.

Here is my Coding!

>

`clc;A=imread('C:\Users\hp\Desktop\matlab\pictures\lenna.png');%sample imagernd_x = randperm(size(A,1)-128,7);%choose 7 random unique points on x-axisrnd_y = randperm(size(A,2)-128,7);%choose 7 random unique points on y-axisimage(A)for ii = 1:4    for jj = 5:7        piece{jj} = A((rnd_x(jj):(rnd_x(jj)+127)),(rnd_y(jj):(rnd_y(jj)+127)),1:3)+100;        figure(jj)        a=imadjust(jj);                imshow(piece{jj});                    end    piece{ii} = A((rnd_x(ii):(rnd_x(ii)+127)),(rnd_y(ii):(rnd_y(ii)+127)),1:3)-100;%Convert chosen numbers to image pieces    figure(ii)    b=imadjust(ii);        imshow(piece{ii});        endimshow(A)`

`clc;A=imread('C:\Users\hp\Desktop\matlab\pictures\lenna.png');%sample imagernd_x = randperm(size(A,1)-128,7);%choose 7 random unique points on x-axisrnd_y = randperm(size(A,2)-128,7);%choose 7 random unique points on y-axisimage(A)for ii = 1:4    for jj = 5:7        piece{jj} = A((rnd_x(jj):(rnd_x(jj)+127)),(rnd_y(jj):(rnd_y(jj)+127)),1:3)+100;        A((rnd_x(jj):(rnd_x(jj)+127)),(rnd_y(jj):(rnd_y(jj)+127)),1:3)= piece{jj}; % add the changed pixel values to the original image A        figure(jj)        a=imadjust(jj);                imshow(piece{jj});`