>> orgImg=imread('cat.png');
>> noisyImage=imnoise(orgImg, 'salt & Pepper', 0.5);
>> r=medfilt2(noisyImage(:,:,1),[3 3]);
>> r=medfilt2(noisyImage(:,:,1),[3 3]);
>> g=medfilt2(noisyImage(:,:,2),[3 3]);
>> b=medfilt2(noisyImage(:,:,3),[3 3]);
>> appFilter=cat(3,r,g,b);
>> subplot(1,3,1), imshow(orgImg);
>> subplot(1,3,2), imshow(noisyImage);
>> subplot(1,3,3), imshow(appFilter);