pwelch: Welch's Power Spectral Density Estimate In phonTools: Tools for Phonetic and Acoustic Analyses

 pwelch R Documentation

Welch's Power Spectral Density Estimate

Description

Calculates a power spectral density estimate using Welch's method.

Usage

``````pwelch (sound, points = 0, overlap = 0, padding = 0,
window = 'hamming', show = TRUE, fs = 1, preemphasisf = 0,
zeromax = TRUE, type,...)
``````

Arguments

 `sound` A vector representing a sound wave, or a 'sound' object. `points` The number of points to be included in each window. If not specified, the sound is divided into 10 equally-sized windows. `overlap` The amount of overlap between adjacent segments, in points. `padding` The amount of zero padding to be applied to each window. `window` The window to be applied to each segment of the signal. See windowfunc() for available options. `show` If FALSE, no plot is created. `fs` The sampling frequency of the sound. If a 'sound' object is passed this does not need to be specified. `preemphasisf` Preemphasis of 3 dB per octave is added to frequencies above the specified frequency. `zeromax` If TRUE, the maximum dB is set to 0. `type` The line type to be used for plotting, passes its value to the 'lty' parameter. `...` any additional arguments will be passed to the internal calls of 'plot'.

Details

This function divides the signal into a number of equally-sized windows, finds the power spectrum of each one, and then finds the average across all windowed sections.

Value

The following columns:

 `hz` The center frequency of the analysis bins. `dB` The dB magnitude/power for the analysis bin.

Author(s)

Santiago Barreda <sbarreda@ucdavis.edu>

Examples

``````
## make a sine wave
#sinewave = sinusoid (f = 300, fs = 1000, dur = 2000, sum = FALSE)