increasing fsolve accuracy when fval values are different in terms of order of magnitude
3 ビュー (過去 30 日間)
古いコメントを表示
I have a set of six equations-six unknowns. When I solve it by fsolve, it "stops prematurely" and gives me 6 values for unknowns that are not exactly the answers that I'm expecting (I've tried different initial guesses, but it's the same). Answer set that fval gives is:
[x1=6.242, x2=2.148, x3=2.688, x4=1.563, x5=-3.359, x6=0.996]
and values of "fval" after solving are:
[-9e-9, 1e-10, -2e-6, 0.0054, -0.1208, -0.1615 ]
(The last 3 fvals are comparatively larger). Please let me know what I can do to enhance the results accuracy? Thanks
0 件のコメント
回答 (1 件)
John D'Errico
2015 年 6 月 25 日
編集済み: John D'Errico
2015 年 6 月 25 日
The simple answer is the one you need to use.
SCALE YOUR VARIABLES. Scale them so they are all roughly the same order of magnitude. A factor of 10 is irrelevant. A dynamic range of 1e10 is a problem.
Then after the solve is done, scale them back.
6 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!