Why does the fmincon optimization give a slightly different solution in MATLAB 2019B as compared to 2020B?

2 ビュー (過去 30 日間)
Pratik Khare
Pratik Khare 2021 年 10 月 18 日
回答済み: Alan Weiss 2021 年 10 月 19 日
I have noticed that I get a different solution when using the fmincon function as compared to my colleague (he has 2019B and I have 2020B). We ran the exact same code, with the same initial conditions and constraints.
Do optimizers like lsqlin or fmincon have different optimization routines based on the MATLAB version?

回答 (1 件)

Alan Weiss
Alan Weiss 2021 年 10 月 19 日
Many things change in each version. The usual issue is that the underlying math libraries can have slight differences. Optimization routines iterate, and these minute differences can be amplified. You might also notice slight differences when running the same routines and versions on different hardware.
Alan Weiss
MATLAB mathematical toolbox documentation





Community Treasure Hunt

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

Start Hunting!

Translated by