error on optimization coding

??? Error using ==> fmincon at 399 FMINCON cannot continue because user supplied objective function failed with the following error: Undefined function or method 'MSYexpSc' for input arguments of type 'double'.
Error in ==> optimization at 27 [x,fval] = fmincon(@objfun,x0,A,b,Aeq,beq,lb,ub,@nonlconstr,options);

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 5 月 31 日

0 投票

This is exactly what you would expect when you do not define that variable within the routine but you use it; this is what I warned you about earlier. And I already posted instructions on how to fix it, 20 minutes before you posted this Question. See http://uk.mathworks.com/matlabcentral/answers/221578#comment_289015

1 件のコメント

Hafiz Sahar
Hafiz Sahar 2015 年 5 月 31 日
this is my nonlconstr.m how i want to replace it

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

カテゴリ

ヘルプ センター および File ExchangeNonlinear Optimization についてさらに検索

タグ

質問済み:

2015 年 5 月 31 日

コメント済み:

2015 年 5 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by