フィルターのクリア

How to solve error in fmincon ?

21 ビュー (過去 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 Center および File ExchangeSolver 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