poly7

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

Convenience function for the poly7 model from MATLAB:

y=p1x7+p2x6++p8
Parameters:
xnumpy.ndarray

One-dimensional array containing x-values.

p1float

Coefficient p1 for the x7 term.

p2float

Coefficient p2 for the x6 term.

p3float

Coefficient p3 for the x5 term.

p4float

Coefficient p4 for the x4 term.

p5float

Coefficient p5 for the x3 term.

p6float

Coefficient p6 for the x2 term.

p7float

Coefficient p7 for the x term.

p8float

Constant term p8.

Returns:
fitnumpy.ndarray

Fitted y-values.