i want to use the following code to demonstrate what RGB is but somehow the green comes yellow. anyone knows why is that?
x=-1:.01:1y=-1:.01:1[X,Y]=meshgrid(x,y);Z=sqrt(X.^2+Y.^2);Z(Z>1)=1;R=ones(330,330);G=ones(330,330);B=ones(330,330);R(1:201,1:201)=Z;G(76:276,76:276)=Z;B(1:201,126:326)=Z;img=cat(3,R,G,B);h=image(img)
thanks in advance yair
Best Answer