![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352133/image.png)
Fitting a Custom Sigmoid
12 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a set of data that decays in a sigmoidal fashion. I believe it should be a good fit to a function of the form shown in the first screenshot, but when I use the Custom Fit feature in the Curvefitting App matlab gives a -Rsq so something is clearly going wrong. I have attached a screenshot of the attempted fit and result as well. I would really appreciate any advice or input as to why this may not be working and alternatives I could try.
Thank you!![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352127/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352127/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352130/image.png)
3 个评论
采纳的回答
Alex Sha
2020-8-27
Hi,if the fitting function is:
1:y=a1*exp(-a2*exp(x))
Root of Mean Square Error (RMSE): 0.291990919479646
Sum of Squared Residual: 2.81353700293277
Correlation Coef. (R): 0.943693599341358
R-Square: 0.890557609437848
Adjusted R-Square: 0.883261450067038
Parameter Best Estimate
---------- -------------
a1 7.58840204504645
a2 1.16352684388827E-7
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352229/image.jpeg)
2:y=a1*exp(-a2*exp(x))+a3
Root of Mean Square Error (RMSE): 0.111213914229836
Sum of Squared Residual: 0.408161645704602
Correlation Coef. (R): 0.991993546182226
R-Square: 0.984051195667188
Adjusted R-Square: 0.982987942045001
Parameter Best Estimate
---------- -------------
a1 3.31691483854775
a2 6.92191293955397E-7
a3 4.93177045354278
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352232/image.jpeg)
3:y=a1*exp(-a2*exp(a4*x))+a3
Root of Mean Square Error (RMSE): 0.00643423581192002
Sum of Squared Residual: 0.001366179885952
Correlation Coef. (R): 0.999973308091645
R-Square: 0.999946616895747
Adjusted R-Square: 0.999943058022131
Parameter Best Estimate
---------- -------------
a1 2.46665608498939
a2 4.05630590375969E-12
a4 1.85195743324274
a3 5.25959927640292
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352235/image.jpeg)
3 个评论
Alex Sha
2020-8-27
Hi, Jane, the above results posted are obtained from another software of "1stOpt". For the fitting function of "y=a1*exp(-a2*exp(a4*x))+a3", it looks simple, but seems to be very difficulty for Matlab, either cftool or lsqcurvefit/nlinfit, to get proper outcomes.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!