function hyp3
disp('Initial Value Problem of Hyperbolic PDE')
disp('Model Equation u_tt - c^2 u__xx = 0')
disp('Initial Condition u(x,0) = exp(-50*x^2)')
disp('Initial Condition u_t(x,0) = 0, x in [-1,1] ')                        
disp('Boundary Condition: outflow')                        
c = input('Wave speed c ?  (default = 1)  ');
if isempty(c)
   c = 1.;
   end

time = input('Stopping time ?  (default = 1)  ');
if isempty(time)
   time = 1.;
   end

dx = 1./50;
x = -1:dx:1.;
dt = time/20;
t = 0:dt:time;
%
clf
for i=1:length(t)
    u = .5*(exp(-50.*(x-c*t(i)).^2)+exp(-50.*(x+c*t(i)).^2));
    plot(x,u)
    axis([-1, 1 , -Inf, 1]);
    %    disp(['Solution at time t = ',num2str(t(i))]);
    title(['Solution at time t = ',num2str(t(i))]);
    M(i) = getframe;
%    fname = ['tmp',num2str(i)];
%    print('-djpeg',fname)
end
movie(M,3)
