Learn R Programming

seewave (version 1.4.3)

pulse: Generate rectangle pulse

Description

This function generates a rectangle pulse.

Usage

pulse(dbefore, dpulse, dafter, f, plot = FALSE, ...)

Arguments

dbefore
duration of the silent period before the pulse
dpulse
duration of the pulse to generate
dafter
duration of silent period after the pulse
f
sampling frequency of the signal to be generated (in Hz)
plot
logical, if TRUE returns an oscillographic plot of the pulse generated (by default FALSE).
...
other plot parameters.

Value

  • Returns a one column matrix corresponding to the signal generated.

See Also

synth, noise

Examples

Run this code
pulse(dbefore=0.5,dpulse=0.1,dafter=0.3,f=8000,plot=TRUE)

Run the code above in your browser using DataLab