powered by
This function returns the crest factor and localizes the different crest(s).
crest(wave, f, channel = 1, plot = FALSE, col = 2, cex = 3, symbol = "*", ...)
an R object.
sampling frequency of wave (in Hz). Does not need to be specified if embedded in wave.
wave
channel of the R object, by default left channel (1).
if TRUE plots the oscillogram of wave and indicates the location of the crest(s)
TRUE
color of the symbol indicating the localisation of the crest(s)
symbol magnification
symbol indicating the localisation of the crest(s)
other
The function returns a list of three items
crest factor
value of the crest(s)
location of the crest(s)
The crest factor of a time series s is calculated according to: $$C = \frac{max(s)}{rms(s)}$$ with rms the root-mean-square (see rms).
rms
Hartmann, W. M. 1998 Signals, sound and sensation. New York: Springer.
oscillo, rms
oscillo
# NOT RUN { data(tico) crest(tico, f=22050) # see the crest location and change the default graphical parameters crest(tico, f=22050, plot=TRUE, sym="-") # }
Run the code above in your browser using DataLab