用python拟合曲线 [英] curve fitting with python

查看:80
本文介绍了用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,xdata,ydata,p0 = None,sigma = None,** kw)

scipy.optimize.curve_fit(f, xdata, ydata, p0=None, sigma=None, **kw)

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

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

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆