clear;fs=50;P=0.2;
%Samples of 1 period of unknown x(t):
t=[0:1/fs:P-1/fs];L=P*fs;
X=1+4*sin(2*pi*5*t);
X=X+10*cos(2*pi*10*t+0.6435);
f=[-(L/2):(L/2-1)]*fs/L;
FX=fft(X)/L;subplot(211),
stem(f,fftshift(abs(FX))),grid on
