Curve fitting data from a script model
이전 댓글 표시
Hello!!
I have some data that I need to fit. And I have a model with one variable that fits, but I would like Matlab to calculate the fit instead of doing it manually. But when I try to use fit, the fitted curve is far off... I hope you can help me!
The model calculates f for a given x and Mdot. f is also a [6x1]

x = [6x1];
FUN = fittype('model(x,Mdot)');
fo = fitoptions(FUN);
fo.StartPoint = [0.08*Msun/yr];
fit1 = fit(x,f,FUN)
plot(fit1,x,f)
답변 (1개)
Star Strider
2016년 12월 1일
0 개 추천
We don’t have your data or your model. You may need one more parameter to fit your function to your data.
댓글 수: 5
Maria Munoz
2016년 12월 1일
Star Strider
2016년 12월 1일
We don’t know why it doesn’t work either, because we don’t have your data or your model function to experiment with to see what the problem is.
Maria Munoz
2016년 12월 1일
Maria Munoz
2016년 12월 1일
Star Strider
2016년 12월 1일
I would like to help, but without your model and an explanation of it, and especially without knowing (and preferably having a mathematical model of) the process that created your data, there is simply no way to go further.
I will delete my Answer in a few minutes.
카테고리
도움말 센터 및 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!
