power2

mdhelper.fit.power.power2(x: ndarray, a: float, b: float, c: float) ndarray[source]

Convenience function for the power2 model from MATLAB.

\[y=ax^b+c\]
Parameters:
xnumpy.ndarray

\(x\)-values.

afloat

Coefficient for the \(x^b\) term.

bfloat

Power constant \(b\) for the \(x^b\) term.

cfloat

Constant for the \(y\)-intercept.

Returns:
fitnumpy.ndarray

Fitted \(y\)-values.