% RGB color components from a image file image.bmp
clear
% specify the image file 
x=imread('image.bmp'); % read input image
% 
xr=x(:,:,1); % red component
xg=x(:,:,2); % green component
xb=x(:,:,3); % blue component
%
% (73,173), (63,89) image coordinates
%yy=73;zz=173
yy=63;zz=89;
(x(yy:yy+3,zz:zz+3,1))
(x(yy:yy+3,zz:zz+3,2))
(x(yy:yy+3,zz:zz+3,3))