Hey, I was wondering if anyone could explain this. I am using fmincon function for optimisation but gets the following error: Error using fmincon (line 220) FMINCON requires the following inputs to be of data type double: 'Aeq','Beq'.
Error in OptimisationCode1 (line 112) [xalpha,fval,flag]=fmincon(gap,xalphakeep,alphamin,alphamax,@nonlconstr,options);
But I believe both alphamin and alphamax are defined as double by default. Could you please suggest any alternatives?
Ajmal Roshan

댓글 수: 1

Ajmal Roshan
Ajmal Roshan 2017년 7월 28일
alphamin and alphamax are both matrices defined in the code initially

댓글을 달려면 로그인하십시오.

 채택된 답변

Torsten
Torsten 2017년 7월 28일
편집: Torsten 2017년 7월 28일

0 개 추천

[xalpha,fval,flag]=fmincon(gap,xalphakeep,[],[],[],[],alphamin,alphamax,@nonlconstr,options);
alphamin and alphamax must be vectors of size "xalphakeep".
Best wishes
Torsten.

댓글 수: 1

Ajmal Roshan
Ajmal Roshan 2017년 7월 28일
Thank you very much. It works Torsten
Ajmal Roshan

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2017년 7월 28일

댓글:

2017년 7월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by