% OCW Universidad de Cantabria
% Cálculo Simbólico y Numérico en Ecuaciones Diferenciales
% © Cursos 2001-2014,  M. Eugenia Pérez, UC
%
syms x y  t
u=heaviside(1-sqrt(x^2+y^2))*besselj(0,2.4048*sqrt(x^2+y^2))
ezsurf(u,[-1.5,1.5],[-1.5,1.5])
axis([-1.5,1.5,-1.5,1.5,-1.5,1.5])
pause
u_n=u*cos(2.4048*t)
%  
ezsurf(subs(u_n,t,0),[-1.5,1.5],[-1.5,1.5])
axis([-1.5,1.5,-1.5,1.5,-1.5,1.5])
pause
%  
ezsurf(subs(u_n,t,0.1),[-1.5,1.5],[-1.5,1.5])
axis([-1.5,1.5,-1.5,1.5,-1.5,1.5])
pause
% 
ezsurf(subs(u_n,t,0.2),[-1.5,1.5],[-1.5,1.5])
axis([-1.5,1.5,-1.5,1.5,-1.5,1.5])
pause
%  
ezsurf(subs(u_n,t,0.3),[-1.5,1.5],[-1.5,1.5])
axis([-1.5,1.5,-1.5,1.5,-1.5,1.5])
pause
M=moviein(81); %  
for j=1:81
   dt=(j-1)*0.1;
w=subs(u_n,t,dt);
ezsurf(w,[-1.5,1.5],[-1.5,1.5])
axis([-1.5,1.5,-1.5,1.5,-1.5,1.5]) 
    % pause
   M(j)=getframe;
end
 
