The "fslove function" got different answer on two computers
2 ビュー (過去 30 日間)
古いコメントを表示
I recently use the "fslove function" to solve the non-linear equations,
Indeed, the function solved it successfully, however, when I used my file running on my mentor's computer,
We suprisely found that the results (solution) are different (almost every variable),
The gap between answers is quite small,
For example, one variable solved on my computer is
0.201819444801955
And on my mentor's
0.203068462986796
There is only 0.6% deviation, but still, that is different,
Becasue the file is completely identical, including the initial guess value and code, nothing makes any change,
Since that, it makes me to wonder that the computer difference or the version of MATLAB (my mentor's ver2016b) might be the reason to cause that kinds of issue?
If that so, is there any adjustment can be done to fix this difference,
Or might be simply something I wasn't aware of about the fsolve funtion?
Right now I am not sure about it, thus I come to here to leave a question.
Many thanks for your reading, if you need any information for my side, please leave a message below, I will reply it ASAP,
Thanks again!
Jonathan
0 件のコメント
採用された回答
Matt J
2019 年 2 月 20 日
編集済み: Matt J
2019 年 2 月 20 日
Have you checked whether both results are valid solutions to the equations? If a continuum of solutions exists, it is quite conceivable (and largely inevitable) for two different computers or Matlab versions to reach different solutions. What was the final fval and exitflag in each case.
2 件のコメント
Matt J
2019 年 2 月 20 日
編集済み: Matt J
2019 年 2 月 20 日
humm, that is interesting, but it also makes the result not much robust by this variation.
Correct, but if the problem has a continuum of solutions, then it is the problem itself that is to blame for the non-robustness, not the software or computer that tries to solve it.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!