fmincon - conditions must depend on optimization output
Afficher commentaires plus anciens
How do I make this fmincon function work. The optimization output fval is supposed to have influence on the condition vector A.
1) If I predefine fval, A is not depending on the optimization output. 2) If I make a loop statement and duplicate the optimization problems, then saying that the loop must stop once x(1st. optimization) - x(2nd. optimization) = 0, matlab cannot solve this because in case the latter fmincon function did not find any solution (my case), the iteration simply is repeated xxx times.
In Excel this is a question of seconds - I have spend about two weeks with this problem - any help !
A = [fval*5];
B = [5];
ffun = @(x)x^3 + x^4;
[x fval] = fmincon(ffun,1,[],[],A,B,[],[]);
1 commentaire
Jan Morawietz
le 15 Mai 2015
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!