% experiment 2
%
fs=700; % fs>fN=2fB
T=1/fs;
N=14;
n=0:N-1;
t=n*T; % With fs=375 Hz, the period is N=75 samples covers two periods 
              % of the continuous time signal.
xp=10+14*cos(200*pi*t-pi/3)+8*cos(500*pi*t+pi/2);
plot(t,xp);title('a periodic signal');xlabel('t');
Xp=fft(xp);
fr=fs/length(t);
f=0:fr:fs-fr;
figure;stem(f,abs(Xp));title('Fourier representation of the signal');
xlabel('Hz');