sin.sum {heR.Misc}R Documentation

Sum of Sines

Description

Function to calculate a time series based on the sum of an arbitrary number of sine functions with different wavelengths, phases, and amplitudes.

Usage

sin.sum(t,wave=c(24, 24, 24*7, 24*7*365),
        phase=c(rep(0,length(wave))),
        amp=c(0,rep(1,length(wave))))

Arguments

t vector of increasing times at which to calculate the model
wave vector containing the wavelengths of the sin functions
phase vector containing the initial phases for the sin functions
amp vector containing the initial amplitudes for the sin functions

Details

Designed to be used with fit.ts.sin

Value

Returns a vector with length equal to length(t) that consists of the sum of sine waves for each given time

Author(s)

Neil E. Klepeis
neil AT exposurescience DOT org
http://klepeis.net

See Also

fit.ts.sin


[Package heR.Misc version 0.0.4 Index]