% M-file to plot cos(pi*t/2) + cos(pi*t/3)

% Period is 12 seconds, so plot for at least 2 periods
t = -15:0.01:15;
y = cos(pi*t/2) + cos(pi*t/3);
plot(t,y)
grid
xlabel('t (seconds)');
ylabel('y(t)');
title('Plot of y(t) = cos(\pi*t/2) + cos(\pi*t/3)');
print -dpsc2 ex1.ps
