%rappresentazione di una funzione cosinusoidale bidimensionale
i=[1:256]/128-1;
j=[1:256]/128-1;
k=[1:24];
[X Y T]=meshgrid(i,j,k);
f=cos(2*pi*(X+Y-0.05*T));
figure(1)
surf(X(:,:,1),Y(:,:,1),f(:,:,1))
shading interp
figure(2)

pcolor(X(:,:,1),Y(:,:,1),f(:,:,1))
shading interp
colorbar
figure(3)
for j = 1:24
   %surf(X(:,:,j),Y(:,:,j),f(:,:,j))
shading interp
xlabel='x';
ylabel='y';
imshow(f(:,:,j),[])
    F(j) = getframe;
end
movie(F)
movie2avi(F,'onda')



