Excel Solver least squares vs MatLab optimization
이전 댓글 표시
Dear community,
I tried to solve an non-linear problem with MatLab using fminsearch and nlinfit. Both work well and I get feasible fits. But then again, the Solver of Excel finds slightly different values with a smaller minimum. Data has been normalized in both cases. Can somebody help me with that? Another issue would be to show the calculated residues in the output.
Thank you very much.
댓글 수: 1
Walter Roberson
2011년 6월 28일
You could reduce the tolerance for fminsearch()
답변 (1개)
John D'Errico
2023년 2월 7일
0 개 추천
fminsearch is never a tool you want to use if you want any kind of strong convergence. Sorry. But comparing anything to fminsearch will always see a poor result on the side of fminsearch. The only serious advantage fminsearch has is it is always there, and it is easy to use. Finally, if you used fminsearch, you are working with a sum of squares of residuals. This alone forces fminsearch into a position of disadvantage, since you now lose a grat deal of precision. Nonlinear regression solvers do not explicitly for a sum of squares of residuals.
As far as a different solver finding different results, this may be a question of starting values, convergence tolerances, etc. It may even be a question of the data not even being identically the same, as far too often we see that people have not moved the data over exactly between systems. If you have rounded your data when copying it into MATLAB, then your data is not the same.
카테고리
도움말 센터 및 File Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!