我的变量x为2700点。这是我的原始数据。
我的数据的直方图如下所示。青色线是我的数据的分布。用curve_fit对直方图进行拟合,得到拟合曲线。拟合的曲线是一个由100000点组成的数字阵列。
我想要生成一个平滑的random data,比如100000点,它遵循分布 of my original data。i.e in principle I want 100000 points below the fitted curve, starting from 0.0 and increasing in the same way as the curve till 0.5
到目前为止,
我正在开发代码,以将Gompertz方程拟合到细菌生长曲线,并使用以下网站提供的一些示例数据进行练习:
。
根据这个代码,拟合应该几乎与数据相匹配(在上面的网页,第3页给出的图表)。但是,当我运行代码时,实际数据绘制正确,但是lsqcurve拟合得很差,并给出了以下消息:
Local minimum possible.
lsqcurvefit stopped because the size of the current step is less than
the default value of the step size tolerance.
我有什么地方做错了吗?
谢谢您抽时间见我,