Create a color image in Matlab with sinusoidal patterns
Simply do it for each color channel, I mean for Red,Green and blue, for each form a separate matrix and then concatenate those, to form a 3D color image. 

fs = 0.08;   //FOR RED CHANNEL
W = 256;
H = 128; 

img1 = zeros(128, 256);
for m = 0 : H-1 
    for n = 0 : W-1
        img1(m + 1, n + 1) = sin(2*pi*fs*m);
    end
end

fs = 0.16;    //FOR Green CHANNEL

img2 = zeros(128, 256);
for m = 0 : H-1 
    for n = 0 : W-1
        img2(m + 1, n + 1) = sin(2*pi*fs*m);
    end
end

fs = 0.01;    //FOR Blue CHANNEL

img3 = zeros(128, 256);
for m = 0 : H-1 
    for n = 0 : W-1
        img3(m + 1, n + 1) = sin(2*pi*fs*m);
    end
end

Color=zeros(128,256,3);
Color(:,:,1)=img1;
Color(:,:,2)=img2;
Color(:,:,3)=img3;
imshow(Color,[]);