Home > sturges > dopgram.m

dopgram

PURPOSE ^

computing the Raw Periodogram

SYNOPSIS ^

function rawpgram = (pg2(2:(np+1)) ./ npts)

DESCRIPTION ^

A routine for computing, not showing, the Raw Periodogram

the input data file is assumed to be -- xin --

the output file of the periodogram is -- rawpgram --

the input file is NOT overwritten

no plots from this version

 

orig Aug 10 90

2.0 dec 17 91

 

CROSS-REFERENCE INFORMATION ^

This function calls:

This function is called by:

SOURCE CODE ^

0001 
0002 
0003 %    DO Pgram 
0004 %
0005 %  A routine for computing, not showing, the Raw Periodogram
0006 %
0007 %  the input data file is assumed to be      -- xin --
0008 %  the output file of the periodogram is   -- rawpgram --
0009 %  the input file is NOT overwritten
0010 %   no plots from this version
0011 %
0012 %   orig  Aug 10  90
0013 %    2.0  dec 17  91
0014 %
0015 %
0016 npts = length(xin);
0017 dat  = detrend(xin);
0018 pg1  = fft(dat);
0019 pg2  = pg1 .* conj(pg1);
0020 np   = fix(npts/2);
0021 %
0022 rawpgram = (pg2(2:(np+1)) ./ npts);
0023 %
0024 clear pg2
0025 clear np
0026 clear npts
0027 clear pg1
0028 clear dat
0029 %
0030 %    end of file
0031

Generated on Tues 20-MAy-2008 10:40:08 by m2html © 2003