% Math 3150 Fall 2008
%
% Problem 3.3.2
thickLines (3) ; % remove if it is not in your system
% space variable
x = linspace (0,1) ;
% time variable will take values in this array
ts=linspace(0,pi,21);
figure(1); clf;
hold on ;
for
it =1:length(ts) , % for every time
t = ts(it) ;
% we don't need to loop over the number of terms
% the sum has only ONE term
s = sin(2*pi*x)*cos(2*t)/2;
plot(x,s) ; % plot the partial sum 
% adjust axis so that all plots are on the same scale
axis ([0 1 -0.5 0.5]) ;
end;
hold off ;
filename='p3_3_2.eps' ;
print( '-depsc2',filename ) ;
system (['epstopdf ',filename]) ;
