randomSignal: Generate a random signal

Description Usage Arguments Details Value Examples

View source: R/Util.R

Description

This function generate a random signal using the noise function of the 'tuneR' package.

Usage

1
randomSignal(n, model = "white", alpha = 1)

Arguments

n

the length of the signal to generate

model

the type of signal to generate

alpha

The power for the power law noise model (defaults are 1 for pink and 1.5 for red noise) (1/f)^alpha.

Details

Signal generated by these function can be built using different models. By default this is a white noise, but one can also used pink, red or power models.

Value

a vector

Examples

1
2
x <- randomSignal(1000)
plot(x,type='l')

jcaude/MSEntropy documentation built on May 21, 2021, 7:31 p.m.