Error in fmincon: undefined getIpOptions

조회 수: 183(최근 30일)
Lukas Meyerolbersleben
Lukas Meyerolbersleben 2019년 7월 25일
댓글: alok kumar 2022년 1월 25일
Good evening,
I am trying to use fmincon to fit a multinomial tree model to behavioural data. I'm aware that other questions have been asked about the same error, but those questions haven't been resolved (see for example and wouldn't apply in my case anyway. Five parameters, each with the lower bound [0] and the upper bound [1], are to be estimated to minimize a G-squared estimate of goodness of fit (expressed in a customized function "Goodness_of_Fit_1", which itself works fine). No other constraints apply here, resulting in the following syntax:
fmincon(@Goodness_of_Fit_1, [0,0,0,0,0], [],[],[],[],[0,0,0,0,0],[1,1,1,1,1])
However, this returns the following error:
Undefined function or variable 'getIpOptions'.
Error in fmincon (line 811)
options = getIpOptions(options,sizes.nVar,mEq,flags.constr,defaultopt,10,0.01);
I am using Matlab R2018b and the path to fmincon is correct (uses the same version).
Thank you very much for your help!
  댓글 수: 2
Lukas Meyerolbersleben
Lukas Meyerolbersleben 2019년 7월 25일
Then it returns:
'getIpOptions' not found.

댓글을 달려면 로그인하십시오.


Jim Hokanson
Jim Hokanson 2019년 11월 26일
I had this problem and just reinstalled the optimizaton toolbox ...
  댓글 수: 3
alok kumar
alok kumar 2022년 1월 25일
There is a add-on option at top right side. you can search for optimization toolbox there.

댓글을 달려면 로그인하십시오.

Matt J
Matt J 2019년 7월 25일
Well, it should be there. On my machine,
>> which -all getIpOptions
F:\Program Files\MATLAB\R2018b\toolbox\optim\optim\getIpOptions.m
I suggest you check your anti-virus software to see if it may have quarantined it. Then, I would do a complete clean re-install. By clean reinstall, I mean you first delete any existing R2018b folders.
  댓글 수: 3
Navreet Singh Thind
Navreet Singh Thind 2021년 2월 22일
Thanks a Lot! It helped

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by