本文介绍了用python拟合曲线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试容纳一些数据和东西,我知道有一个简单的命令可以使用python/numpy/matplotlib来做到这一点,但是我找不到它.我认为是

I'm trying to fit some data and stuff, I know there is a simple command to do this with python/numpy/matplotlib, but I can't find it. I think it is something like

popt,popc = numpy.curvefit(f,x)

其中,poptf的参数,popc是拟合质量,f是f的预定义函数.你们中有人知道吗?

where popt is the paramters of f, popc is the fit quality and f is a predefined function of f. Does any of you know it?

推荐答案

看看 scipy.optimize.curve_fit :

使用非线性最小二乘法将函数f拟合到数据中.

Use non-linear least squares to fit a function, f, to data.

这篇关于用python拟合曲线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 04:53
查看更多