how to get a function equation

1 visualización (últimos 30 días)
farfar
farfar el 14 de Abr. de 2017
Editada: John D'Errico el 14 de Abr. de 2017
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 comentarios
farfar
farfar el 14 de Abr. de 2017
attached
John D'Errico
John D'Errico el 14 de Abr. de 2017
Editada: John D'Errico el 14 de Abr. de 2017
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Least Squares en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by