MATLAB Answers


Unrecognized function or variable 'getIpOptions'.

Antonios Nasioulas さんによって質問されました 2019 年 11 月 18 日 19:58
最新アクティビティ Antonios Nasioulas さんによって コメントされました 2019 年 11 月 19 日 23:10
I try to use fmincon with options being
options = optimset('Algorithm', 'interior-point', 'Display', 'off', 'MaxIter', 10000);
and this is the error I get:
Unrecognized function or variable 'getIpOptions'.
Error in fmincon (line 822)
options = getIpOptions(options,sizes.nVar,mEq,flags.constr,defaultopt,10,0.01);
Error in model_fitting (line 40)
[parameters_opt,ll_opt]=fmincon(@(x) RW_model(x,learning_data,false), init, [], [], [],
[], lowerBound, higherBound, [], options);
I saw that others have the same issue, but I din't find any solution.

  0 件のコメント

サインイン to comment.

1 件の回答

Adam Danz
回答者: Adam Danz
2019 年 11 月 18 日 22:38
編集済み: Adam Danz
2019 年 11 月 18 日 22:38

The file getIpOptions.m should be stored in the directory identified below. Run this line of code which should open the directory where this function is stored and look for that function (for Windows)
If the file exists, the path has somehow been removed. Restart Matlab and see if the problem goes away. If it doesn't go away, check your startup.m file (if that file exists) to determine if you're removing important paths. You could also try running restoredefaultpath.
If the file doesn't exist, is it possible that it was deleted?

  5 件のコメント

Antonios Nasioulas 2019 年 11 月 19 日 22:55
I get
'getIpOptions' not found.
I use matlab_R2019b_maci64.
Thanks for the help
Walter Roberson
2019 年 11 月 19 日 23:00
Reinstall the Optimization Toolbox
Antonios Nasioulas 2019 年 11 月 19 日 23:10
This worked! Thanks!

サインイン to comment.

Translated by