how to get a function equation

1 次查看(过去 30 天)
farfar
farfar 2017-4-14
Hello every one I have two sets of data which have nonlinear relationship, it looks like Gaussian distribution according to the figure I got (attached). is there a way that I can input these two of data set in matlab and then get the function (equation associated with the curve)? function seems to be exponential, something like normal distribution function. any help would be appreciated !
  2 个评论
John D'Errico
John D'Errico 2017-4-14
编辑:John D'Errico 2017-4-14
Learn to use tools like the optimization toolbox (thus lsqnonlin or lsqcurvefit), or the curvefitting toolbox, or nlinfit from the stats toolbox. If you lack any of those tools, then get one, since you are trying to solve problems of this class.
Any will suffice. If you don't have them, then download a tool from the File Exchange. I'd suggest fminspleas as a decent choice. (Because I wrote it.) Finally, you will need to learn about modeling, about how to choose a model, how to parameterize that model, about what are starting values and why you often need good starting values.
As far as the model goes, possibly a sum of three Gaussian terms would suffice. On the other hand, a well fit spline could easily be as good a choice of model. Much depends on what you want to do with that model. So knowing your goals is important.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Least Squares 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by