%% Display a window containing two color fields. %% Two 3-element (RGB) column vectors %% with values between 0 and 1 %% should be passed as arguments. function showcols(rgb_1,rgb_2) cmap = colormap; cmap(1,:) = rgb_1'; cmap(2,:) = rgb_2'; colormap(cmap); image([1,2]); line([1.5,1.5], [0.5,1.5],'Color',[0,0,0]);