sigcos
Efficient computing of a cosinusoid.
Namespace: dsp
Prototype
static Vecf sigcos(float f, int n)
Parameters
f | Normalized frequency of the cosinus (between -0.5 et 0.5) |
n | Number of points to generate. |
Returns
Real vector defined by:
Description
This function generates a real cosinusoidal signal, based on an harmonic oscillator (which is far more efficient than by using the trigonometric functions of the standard library). Note however that if \(n\) is a big number, there can be some divergence, both in gain and in phase.