power.spectrum: Power Spectrum

Description Usage Arguments Value Author(s) Examples

Description

Calculate and plot power spectrum for a wave.

Usage

1
power.spectrum(y, samp.freq = 11025, plot = TRUE, plot_range = NULL)

Arguments

y

An object of class "EMG" or "Wave".

samp.freq

The recording frequency. Defaults to 11025 Hz.

plot

logical. Should the power spectrum be plotted? Defaults to TRUE.

plot_range

numeric vector. The range for plotting. Defaults to 0 to samp.freq / 2.

Value

A data.frame containing the intensity at each frequency from 0 to samp.freq / 2.

Author(s)

Kevin Middleton (middletonk@missouri.edu)

Examples

1
2
3
4
5
6
7
8
9
pulse <- read.EMG(system.file("extdata",
                              "pulse_1.wav",
                              package = "EMG"))
power.spectrum(pulse)

no_signal <- read.EMG(system.file("extdata",
                                  "amp_on_baseline.wav",
                                  package = "EMG"))
power.spectrum(no_signal)

kmiddleton/EMG documentation built on May 20, 2019, 12:50 p.m.