fourier1¶
- mdhelper.fit.fourier.fourier1(x: ndarray, a0: float, a1: float, b1: float, omega: float) ndarray [source]¶
Convenience function for the
fourier1
model from MATLAB.\[y=a_0+a_1\cos{(\omega x)}+b_1\sin{(\omega x)}\]- Parameters:
- xnumpy.ndarray
\(x\)-values.
- a0float
Constant (intercept) term \(a_0\) for the \(k=0\) cosine term.
- a1float
Coefficient \(a_1\) for the first \(\cos\) term.
- b1float
Coefficient \(b_1\) for the first \(\sin\) term.
- omegafloat
Fundamental frequency \(\omega\) of the signal.
- Returns:
- fitnumpy.ndarray
Fitted \(y\)-values.