pattern = zeros(3, 3, 3);
for channel = 1 : 3
		if channel == 1
			% R visible at odd row && odd column
			pattern(1:2:end, 1:2:end, channel) = 1; 
	    elseif channel == 2
			% G visible at odd row && even column
			% and even row && odd column
			pattern(1:2:end, 2:2:end, channel) = 1;
			pattern(2:2:end, 1:2:end, channel) = 1;
		else
			% B visible at even row && even column
			pattern(2:2:end, 2:2:end, channel) = 1;
		end	
end
pattern = pattern(2:3, 1:2, :);
imshow(uint8(pattern*255));
