what does the error ''Undefined function or method 'wholenetwork' for input arguments of type 'double'" mean?

1 回表示 (過去 30 日間)
hello, i am trying to optimize nonlinear constrained problem. the nonlinear constraints are saved in wholenetwork.m format. the optimization error is shown as Undefined function or method 'wholenetwork' for input arguments of type 'double'. what should i do?

採用された回答

Marc Jakobi
Marc Jakobi 2015 年 11 月 13 日
It sounds like you may have one of the following two problems:
1. The folder containing your "wholenetwork.m" file is not added in Matlab. You can find this out by typing "which wholenetwork" in the command window. If it doesn't show you a path, you have to add the path to Matlab in "Home" -> "Set path"
2. You have a variable in your workspace called "wholenetwork". In this case, Matlab try to interpret the input arguments for your function as indexes of the variable.
  2 件のコメント
Walter Roberson
Walter Roberson 2015 年 11 月 14 日
#2 is not possible; the error would have been different if a variable named wholenetwork existed.
anna thomas
anna thomas 2015 年 11 月 17 日
Thank you all for the answers. I got it done correctly.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by