L = 1;
c = 1.0;
w0 = 4*c^2/L^2
w = w0 + 0.2
term = 1./( w0^2 - w^2)

t = 0:0.05:20;
x = 0:0.02:1;



for i = 1:length(t);
for j = 1:length(x);
u(j) = (- cos(2*pi*c*t(i)/L) + cos(w*t(i)))*term*sin(2*pi*x(j)/L);
end
plot(x,u);
axis([0 1 -1 1]);
h = gcf;
M(i) = getframe(h);
end

movie(M);

