Skip to contents

Variance of a Sine wave

Usage

VarSine(full.amp)

Arguments

full.amp

Peak to peak amplitude of a sine wave

Value

numeric, the variance of a sine wave

Examples

x <- sin(seq(0, 2 * pi, length.out = 1000))
plot(x, type = "l")

var(x)
#> [1] 0.5
VarSine(2)
#> [1] 0.5
x5 <- x * 5
var(x5)
#> [1] 12.5
VarSine(diff(range(x5)))
#> [1] 12.49997