why fmincon returns different results every time

4 ビュー (過去 30 日間)
xueqi
xueqi 2012 年 9 月 10 日
Hi fellows,
I am using fmincon to do the optimization problem. But every time I run it it gives me different result. Is there anyone who know what the reason could be?
Cheers

採用された回答

Sean de Wolski
Sean de Wolski 2012 年 9 月 10 日
  • Do you have a rand() in there that makes your function non-deterministic?
  • Is your function non-deterministic in some other way?
  • Are you using the same starting point, x0?
  • Are you modifying the options at all?
The more details you can provide us with the better.
  1 件のコメント
SHWETA GUPTA
SHWETA GUPTA 2013 年 2 月 28 日
I don't have rand() in my code, starting point is same every time I run the code but still it gives me different result. Please help.

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

その他の回答 (1 件)

xueqi
xueqi 2012 年 9 月 11 日
Yeah I did have a rand()...This explains!

カテゴリ

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