% im1.m
pict=imread('im1a.jpg','jpg');
image(pict);
r=pict(:,:,1); g=pict(:,:,2); b=pict(:,:,3);
newpict=pict;
newpict(:,:,3)=0;
image(newpict);
z(1)=subplot(1,3,1);
image(pict); title('RGB original');
z(2)=subplot(1,3,2);
image(newpict); title('New one');
z(3)=subplot(1,3,3);
newpict=mean(pict,3);
image(newpict);
