Skip to contents

Cosine and sine Fourier pairs, exactly periodic with period

Usage

fourier_terms(t, period, order)

Arguments

t

Numeric vector of times.

period

Positive period.

order

Integer, number of harmonics.

Value

A list of rows, each 2 * order long.

Examples

f <- fourier_terms(t = c(0, 7, 14), period = 7, order = 1)
f   # identical rows: exactly periodic
#> [[1]]
#> [1] 1 0
#> 
#> [[2]]
#> [1]  1.000000e+00 -2.449294e-16
#> 
#> [[3]]
#> [1]  1.000000e+00 -4.898587e-16
#>