Effacer les filtres
Effacer les filtres

why fmincon returns different results every time

3 vues (au cours des 30 derniers jours)
xueqi
xueqi le 10 Sep 2012
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

Réponse acceptée

Sean de Wolski
Sean de Wolski le 10 Sep 2012
  • 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 commentaire
SHWETA GUPTA
SHWETA GUPTA le 28 Fév 2013
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.

Connectez-vous pour commenter.

Plus de réponses (1)

xueqi
xueqi le 11 Sep 2012
Yeah I did have a rand()...This explains!

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by