fitting a parabola giving unreasonable answer
古いコメントを表示
Hello,
I'm trying to fit a parabola to 4 data points using the following equation:
y = a.*exp(((-4.*pi.*b.*6.022e23)./(8.314.*1623)).*(((c./2.*(c-x).^2) - (1/3.*(c-x).^3))));
I'm getting an unreasonable result, which looks like this:
I think the equation is correct because I copy and pasted it from a function that employs it to create this graph, which models the same points:
5 件のコメント
Image Analyst
2019 年 4 月 11 日
Attach your script. Also, what is the sum of your residuals (fitted values minus training values) at the 4 points?
Walter Roberson
2019 年 4 月 11 日
What are the four data points, in numeric form?
Michael Phillips
2019 年 4 月 11 日
Michael Phillips
2019 年 4 月 11 日
John D'Errico
2019 年 4 月 12 日
編集済み: John D'Errico
2019 年 4 月 12 日
But your model is not a parabola. It is a nasty to compute exponential thing. (Nasty in double precision arithmetic.)
Seems confusing. I'd suggest your problem is the huge dynamic range of the parameters. That gets the solver in trouble.
b = [2;-1.15e21;1.2e-10];
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および 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!
