%color matrix animation
a=[1 2 3 4 5];
A=[a; a*2; a*3; a*4; a*5];
B=log(A);
N = 300;
for k=0:6000
    t = sin(8*pi*k/N);
    C = (1-t)*A + t*(B);
    imagesc(C); axis equal;
    pause(1/30);
end;