Create sinusoidal interpolation based on two values, minv and maxv. The lower and upper bounds/peaks of the function.

int_sin(minv, maxv, period = 365, x = period, phi = -pi/2)

Arguments

minv

Numeric value, used as the lower bound.

maxv

Numeric value, used as the upper bound.

period

Numeric value, period width (e.g. 365 days).

x

Numeric value, number of partitions to use.

phi

Numeric value, phase shift.

Value

Numeric vector with the interpolated function. Same length as x. Returned invisibly, so it must be assigned to a variable.

Examples

int_sin(-1, 1)
int_sin(-1, 1, period = 10)