a problem with setting fmincon options?

5 ビュー (過去 30 日間)
Abdelrahman Taha
Abdelrahman Taha 2020 年 1 月 16 日
編集済み: Matt J 2020 年 1 月 16 日
I am doing optimization using fmincon, and while trying to set the objective limit to (1) using this command:
options = optimoptions('fmincon','ObjectiveLimit',1.0);
i get this error:
Error using optimfcnchk (line 99)
NONLCON must be a function.
Error in fmincon (line 427)
confcn = optimfcnchk(NONLCON,'fmincon',length(varargin),funValCheck,flags.gradconst,false,true);
So, what could be casuing this problem? given that the function is working properly without setting that limit and the error is certainly caued by this above posted command.
  1 件のコメント
Matt J
Matt J 2020 年 1 月 16 日
and the error is certainly caued by this above posted command.
No, not necessarily.

サインインしてコメントする。

採用された回答

Matt J
Matt J 2020 年 1 月 16 日
編集済み: Matt J 2020 年 1 月 16 日
I would guess that you entered your options object as the 9th input argument to fmincon when it really should be the 10th. If you have no nonlinear constraints, it should look like,
x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,[],options)
  1 件のコメント
Abdelrahman Taha
Abdelrahman Taha 2020 年 1 月 16 日
Thank you so much

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNonlinear Optimization についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by