MathTop

statistics_logarithmic_fit 函数

使用正 x 值将数据拟合为对数模型 a + b*log(x)。

语法

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

参数与选项

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

示例

  1. 对数回归拟合Statistics:-LogarithmicFit([[1, 1], [exp(1), 3], [exp(2), 5]], x)返回 2.0*log(x) + 1.0。