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=p1x6+p2x5++p7
Parameters:
xnumpy.ndarray

One-dimensional array containing x-values.

p1float

Coefficient p1 for the x6 term.

p2float

Coefficient p2 for the x5 term.

p3float

Coefficient p3 for the x4 term.

p4float

Coefficient p4 for the x3 term.

p5float

Coefficient p5 for the x2 term.

p6float

Coefficient p6 for the x term.

p7float

Constant term p7.

Returns:
fitnumpy.ndarray

Fitted y-values.