MathTop

statistics_power_fit 函数

对正 x 值和 y 值取对数后使用最小二乘法,将数据拟合为幂模型 a*x^b。

语法

  • Statistics:-PowerFit([[x1, y1], ...], x)
  • Statistics:-PowerFit(xValues, yValues, x)

参数与选项

data点对,或分别给出的 x 与 y 列表;两个坐标值都必须为正数。
var变量名称。

示例

  1. 幂回归拟合Statistics:-PowerFit([[1, 2], [2, 8], [4, 32]], x)返回 2*x^2。