rawPeriodogram: Raw Periodogram

Description Usage Arguments Value Examples

Description

This function computes and plots a raw periodogram. This function may produce inaccurate results on stochastic data.

Usage

1

Arguments

x

x a numeric vector

sf

Sampling frequency in Hz. If specified the power spectrum will be plotted with Hz instead of normalised frequency on the x-axis.

plot

Whether or not to plot the periodogram. If more than one series is used only the first will be plotted.

amp

Whether or not to return the amplitude spectrum.

phase

Whether or not to return the phase spectrum.

N

Length of Fourier transform used to compute spectrum. If NULL N will be chosen for speed and not to prevent scalloping loss.

Value

Returns the periodogram and optionally plots it.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
hz.slow<-5
hz.fast<-50
t<-seq(0,1,length.out=300)

sin.sig.slow<-sin(2*pi*t*hz.slow)
sin.sig.fast<-sin(2*pi*t*hz.fast)
sin.sig.combo<-sin.sig.slow+sin.sig.fast

ts.plot(sin.sig.combo)
rawPeriodogram(sin.sig.combo)
rawPeriodogram(sin.sig.combo,300)

FIACH documentation built on May 1, 2019, 8:02 p.m.

Related to rawPeriodogram in FIACH...