필터 지우기
필터 지우기

How to solve error in fmincon ?

조회 수: 19 (최근 30일)
Nathalie
Nathalie 2014년 5월 8일
편집: HN 2020년 11월 8일
Hi,
what I'm doing wrong so that it displayes error after my specification:
options = optimset('Display','off','Algorithm','active-set');
parameters=fmincon(@SMM2optimconstraint, [10, 0.5, 50, 1.55], A, b, Aeq, beq, lb, ub, options);
Error is:
Error using optimfcnchk (line 286)
NONLCON must be a function.
Error in fmincon (line 436)
confcn = optimfcnchk(NONLCON,'fmincon',length(varargin),funValCheck,flags.gradconst,false,true);
Thanks.

채택된 답변

Matt J
Matt J 2014년 5월 8일
You skipped the nonlcon argument. If you have no nonlinear constraints, be sure to pass [] as below.
parameters=fmincon(@SMM2optimconstraint, [10, 0.5, 50, 1.55], A, b, ...
Aeq, beq, lb, ub, [], options);
  댓글 수: 1
HN
HN 2020년 11월 8일
편집: HN 2020년 11월 8일
Thank you Matt J

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by