Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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 Commenti
MAMATHA YADAVALLI
MAMATHA YADAVALLI il 25 Mag 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 il 25 Mag 2018
Modificato: Torsten il 25 Mag 2018
Use
[guess,fval] = fmincon(@objfun,x0,[],[],[],[],[],[],@confuneq, options);
instead of
[guess,fval] = fmincon(@objfun,x0,[],[],[],[],[],options,@confuneq);
Best wishes
Torsten.

Accedi per commentare.

Risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by