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

1 view (last 30 days)
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 Comments
MAMATHA YADAVALLI
MAMATHA YADAVALLI on 25 May 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 on 25 May 2018
Edited: Torsten on 25 May 2018
Use
[guess,fval] = fmincon(@objfun,x0,[],[],[],[],[],[],@confuneq, options);
instead of
[guess,fval] = fmincon(@objfun,x0,[],[],[],[],[],options,@confuneq);
Best wishes
Torsten.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!