clg t1=[0:63]*2*pi/7; % t1 gives a frequency that is not one of the FFT freqs t2=[0:63]*2*pi/8; a1=1; a2=.5; x=a1*exp(i*t1) + a2*exp(i*t2); subplot(211); plot([0:63],real(x)); v=axis; axis([0 64 v(3) v(4)]); title('Re(X) Time Series'); ylabel('Amplitude'); xlabel('index k'); axis; subplot(212); y=fft(x); plot([1:64],2*log10(abs(y))); v=axis; axis([0 64 v(3) v(4)]); xlabel('Frequency index j'); ylabel('LOG_10(ABS(Y^2))'); axis; title('Periodogram of X with N=64'); %gtext('X = a1*exp(i*[1:64]*2*pi/7) + a2*exp(i*[1:64]*2*pi/8)'); print -deps pgram2