Q = zeros(100,100);

figure
k = 0;
while 1
    for i=1:100
    for j=1:100
      if i==j+k
        Q(i,j) = 255-k;
      end
    end
    end
    k = k+1;      
    imshow(Q)
    pause(0.05)
    Q = zeros(100,100);
end