poly6

mdhelper.fit.polynomial.poly6(x: ndarray, p1: float, p2: float, p3: float, p4: float, p5: float, p6: float, p7: float) ndarray[source]

Convenience function for the poly6 model from MATLAB:

\[y=p_1x^6+p_2x^5+\cdots+p_7\]
Parameters:
xnumpy.ndarray

One-dimensional array containing \(x\)-values.

p1float

Coefficient \(p_1\) for the \(x^6\) term.

p2float

Coefficient \(p_2\) for the \(x^5\) term.

p3float

Coefficient \(p_3\) for the \(x^4\) term.

p4float

Coefficient \(p_4\) for the \(x^3\) term.

p5float

Coefficient \(p_5\) for the \(x^2\) term.

p6float

Coefficient \(p_6\) for the \(x\) term.

p7float

Constant term \(p_7\).

Returns:
fitnumpy.ndarray

Fitted \(y\)-values.