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