%% DC-Centered Periodogram
% Obtain the periodogram of a 100 Hz sine wave in additive N(0,1) noise. The data are sampled at 1 kHz. Use the 'centered' option to obtain the DC-centered periodogram and plot the result.

fs = 1000;
t = 0:0.001:1-0.001;
x = cos(2*pi*100*t)+randn(size(t));
periodogram(x,[],length(x),fs,'centered')

% Copyright 2015 The MathWorks, Inc.