Hi, I am trying to fit a custom equation to my data. Using cuve fitting tool box the closest was exp1 fit but it is still not a good fit. I tried the other available fits as well and it did not turned out good. As you see from the attached file at the beginning it is a linear , in the middle it is like exp and at the end it is different than linear and exp fit.
What are your recommendation as an equation to fit that curve.
Thank you

댓글 수: 3

Michael Van de Graaff
Michael Van de Graaff 2022년 1월 18일
This seems less like a matlab question than a generic math/data analysis question. What produced these data? Generally I would think you would have some prior expectation of what functional form to expect.
If you simply need a function which follows the data in this domain, then just use interp, but if you need to use the parameters, then your functional form is fix by those requirements, and deviation from it indicates a mismatch between the data and the expectation.
It sounds more like you just need a good interpolation though
Star Strider
Star Strider 2022년 1월 18일
What process created those data?
To fit the data, create a methematical model of the process that created them, then fit the parameters of the model.
Sam Chak
Sam Chak 2022년 1월 18일
Looks like it is plotted on a logarithmic scale. Since the exponential decay model does not fit, and you don't know the process (can be static or dynamic) that creates the data, then you can try the following:
The above suggestions may not solve your problem, but they are based on my experience with certain functions that display the asymptotic convergence behavior.

댓글을 달려면 로그인하십시오.

답변 (1개)

Abhiroop Rastogi
Abhiroop Rastogi 2022년 2월 23일

0 개 추천

Hi Birsen,
The data shown in the figure looks like it is representing a Weibull Distribution. You can try the inbuilt fittype "weibull" for fitting the curve using the command:
fitCurve = fit(xData,yData,'weibull');
Another fit-type that can be used for the data is "cubicspline" which does a piecewise computation for fitting the curve.
You can use the following command for cubicspline fitting.
fitCurve = fit(xData,yData,'cubicspline');
You can see the resulted plots in the figures attached.

카테고리

도움말 센터File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

질문:

2022년 1월 17일

답변:

2022년 2월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by