I try to generate an image using this code.
w=10*pi/256;
E=zeros(256,256,100);
for t=1:100
for y=1:size(E,1)
for x=1:size(E,2)
E(x,y,t)=255*(sin(w)*sin(w*y*2)+1)/2)+1;
end
end
imshow(E(:,:,t),[])
title(t);
drawnow
pause(0.1)
end
However I'm confused how to generate the image that shift over time, like for time t=2
, the stripes is shifted by 0.0001 in the x direction.
Any idea how to fix this? Thank you.