Error in fmincon: undefined getIpOptions

23 Ansichten (letzte 30 Tage)
Lukas Meyerolbersleben
Lukas Meyerolbersleben am 25 Jul. 2019
Kommentiert: alok kumar am 25 Jan. 2022
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 https://de.mathworks.com/matlabcentral/answers/447671-error-in-fmincon-getipoptions-not-found) 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 Kommentare
Matt J
Matt J am 25 Jul. 2019
What happens when you do
>> which -all getIpOptions
Lukas Meyerolbersleben
Lukas Meyerolbersleben am 25 Jul. 2019
Then it returns:
'getIpOptions' not found.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Jim Hokanson
Jim Hokanson am 26 Nov. 2019
I had this problem and just reinstalled the optimizaton toolbox ...
  3 Kommentare
Vivian Toca Díaz
Vivian Toca Díaz am 15 Jul. 2021
how did u do that?
alok kumar
alok kumar am 25 Jan. 2022
There is a add-on option at top right side. you can search for optimization toolbox there.

Melden Sie sich an, um zu kommentieren.


Matt J
Matt J am 25 Jul. 2019
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 Kommentare
Marcelo Fernandes
Marcelo Fernandes am 25 Nov. 2019
For anyone having this problem, it appears to happen when you install a new version of MATLAB and uninstall the older versions from the computer - in this order. It could be that those files (such as getIpOptions.m) have not been installed because of previous files on the computer.
I followed Matt J's suggestion and it's fixed.
Thank you, Matt!
Navreet Singh Thind
Navreet Singh Thind am 22 Feb. 2021
Thanks a Lot! It helped

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by