poly2¶
- mdhelper.fit.polynomial.poly2(x: ndarray, p1: float, p2: float, p3: float) ndarray [source]¶
Convenience function for the
poly2
model from MATLAB:\[y=p_1x^2+p_2x+p_3\]- Parameters:
- xnumpy.ndarray
One-dimensional array containing \(x\)-values.
- p1float
Coefficient \(p_1\) for the \(x^2\) term.
- p2float
Coefficient \(p_2\) for the \(x\) term.
- p3float
Constant term \(p_3\).
- Returns:
- fitnumpy.ndarray
Fitted \(y\)-values.