% Math 3150-4 Computer Lab - Fernando Guevara Vasquez
%
% Plots snapshots of a string of Computer Lab 2b

x = linspace(0,1); % 100 points equally spaced between 0,1

figure(1);% create a new figure
clf;      % clears figue
hold on;  % let new plots overlay over previous ones
for t = 0:1/4:2,
 u =  sin(pi*x)*cos(pi*t) - (1/2)*sin(2*pi*x)*cos(2*pi*t) + (1/3)*sin(3*pi*x)*cos(3*pi*t);
 plot(x,u,'k');
end;
hold off; % stop letting new plots overlay
