sinusoid function

Plot a Sinusoid

Plot a Sinusoid

Plots a sinusoid over 0 to 2π\pi.

sinusoid(amplitude, frequency, phase, ...)

Arguments

  • amplitude: the amplitude of the sinsuoid (its maximum value).
  • frequency: the frequency of the sinusoid in 0 to 2π\pi (number of cycles).
  • phase: the phase of the sinusoid (location of the peak).
  • ...: additional arguments passed to the plot.

Details

Sinusoidal curves are useful for modelling seasonal data. A sinusoid is plotted using the equation: Acos(ftP),t=0,,2πA\cos(ft-P), t=0,\ldots,2 \pi, where AA is the amplitude, ff is the frequency, tt is time and PP is the phase.

Examples

sinusoid(amplitude=1, frequency=1, phase=1)

References

Barnett, A.G., Dobson, A.J. (2010) Analysing Seasonal Health Data. Springer.

Author(s)

Adrian Barnett a.barnett@qut.edu.au

  • Maintainer: Adrian Barnett
  • License: GPL (>= 3)
  • Last published: 2022-03-21

Useful links