m1 = zeros(300,300); m1(1:100,1:300) = 0.75; m2 = zeros(300,300); m2(101:200,1:300) = 0.75; m3 = zeros(300,300); m3(201:300,1:300) = 0.75; color_img(:,:,1) = m1; color_img(:,:,2) = m2; color_img(:,:,3) = m3; subplot(2,3,1), imshow(m1), title('Red component') subplot(2,3,2), imshow(m2), title('Green component') subplot(2,3,3), imshow(m3), title('blue component') subplot(2,1,2), imshow(color_img), title('The color image')
MATLAB: How can i exchange these code to display 1-in top red color 2-and in middle a white color and inside it a yellow circular 3-and in botton green color
https://en.wikipedia.org/wiki/flag_of_kurdistan#/media/file:flag_of_kurdistan.svg
Best Answer