function I = pdgrm(tseries)
% PDGRM(TSERIES) Periodogram of TSERIES
% TSERIES must be a column vector
% returns a column vector

n = length(tseries);
tscent = tseries - mean(tseries);
df = 2*fft(tscent)/n;
I = n*abs(df).^2/2;
I = I(2:(floor(n/2)+1));
