Excel Solver least squares vs MatLab optimization

4 ビュー (過去 30 日間)
Christian Opitz
Christian Opitz 2011 年 6 月 28 日
回答済み: John D'Errico 2023 年 2 月 7 日
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
Walter Roberson 2011 年 6 月 28 日
You could reduce the tolerance for fminsearch()

サインインしてコメントする。

回答 (1 件)

John D'Errico
John D'Errico 2023 年 2 月 7 日
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.

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by