spk: compute a frequency spectrum

Description Usage Arguments Value Author(s) See Also Examples

View source: R/spk.R

Description

this is an internal function for shorthand purposes

Usage

1
spk(x)

Arguments

x

a real-valued input vector

Value

a vector of spectral coefficients corresponding to a real-to-real FFT

Author(s)

Benjamin N. Taft ben.taft@landmarkacoustics.com

See Also

fft

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x) 
{
    n <- floor(length(x)/2)
    s <- fft(x)
    Re(Conj(s) * s)[1:n]
  }

landmarkacoustics/SoundPoints-R documentation built on May 29, 2019, 9:14 a.m.