Effacer les filtres
Effacer les filtres

i am trying to use fmincon for optimization problem i am getting below error

1 vue (au cours des 30 derniers jours)
MAMATHA YADAVALLI
MAMATHA YADAVALLI le 24 Mai 2018
Modifié(e) : Torsten le 25 Mai 2018
suppose my objective function named as objfun.m and i have to optimize four variables in that.i written objective function in that.and confun.m have the all the constraints.in my main function i called two functions.it shows error.
  3 commentaires
MAMATHA YADAVALLI
MAMATHA YADAVALLI le 25 Mai 2018
Error using fmincon (line 284) Row dimension of Aeq is inconsistent with length of beq.
Error in fig2_main (line 88) [alpha_opt,Q1e,Q2e,QR1e,fval] = fmincon(@objfun,alpha_opt,Q1e,Q2e,QR1e,[],[],[],[],[],[],@confuneq,options);
Torsten
Torsten le 25 Mai 2018
Modifié(e) : Torsten le 25 Mai 2018
Use
[guess,fval] = fmincon(@objfun,x0,[],[],[],[],[],[],@confuneq, options);
instead of
[guess,fval] = fmincon(@objfun,x0,[],[],[],[],[],options,@confuneq);
Best wishes
Torsten.

Connectez-vous pour commenter.

Réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by