% Plot cos(2 pi t) which is sampled at 10 Hz
% 
% One period is one second, so plot for two periods,
% -1 second to 1 second
%
% Sample at ten times per second, so interval between
% samples is 1/10 second, and samples will go from
% -10 to 10

n = -10:10;
dt = 1/10;
x = cos(2*pi*n*dt);
stem(n,x);
grid
axis([-10 10 -1.5 1.5])
xlabel('n');
ylabel('x[n]');
print -dpsc2 ex2.ps
