Error using optimoptions (line 124)
Show older comments
I am getting the error message mentioned in the title while executing following line
opts = optimoptions('fmincon','Algorithm','interior-point');
I tried setting the default path through
restoredefaultpath
savepath
rehash toolboxcache
Still getting the same error. Can someone help?
Thanks
8 Comments
Ameer Hamza
on 4 Nov 2020
Error is causes inside the exception handler. Can you post the complete error message? Also, run the following line in command window
dbstop if caught error
and run your code again. The code will automatically halt when the error occurs and open a file. Please tell name of that file.
Vishakha Ranade
on 4 Nov 2020
Mario Malic
on 4 Nov 2020
Do you have one set of options, and then you're calling another ones?
Is this the complete error message?
Vishakha Ranade
on 5 Nov 2020
Mario Malic
on 5 Nov 2020
Try this example, if you can't open it, here's link
openExample('optim/NondefaultOptionsfminconExample')
Does it report error, if it does, then there might be something wrong with your MATLAB files.
Vishakha Ranade
on 5 Nov 2020
Mario Malic
on 5 Nov 2020
Get the code from link and try it.
Vishakha Ranade
on 5 Nov 2020
Accepted Answer
More Answers (1)
Bruno Luong
on 5 Nov 2020
Edited: Ameer Hamza
on 5 Nov 2020
Make sure you have optimization toolbox installed
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.9.0.1495850 (R2020b) Update 1
MATLAB License Number: xxxxxx
Operating System: Microsoft Windows 10 Home Version 10.0 (Build 19042)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.9 (R2020b)
MATLAB Compiler Version 8.1 (R2020b)
Optimization Toolbox Version 9.0 (R2020b)
Signal Processing Toolbox Version 8.5 (R2020b)
7 Comments
Mario Malic
on 5 Nov 2020
It's a good idea to remove your license number I believe.
Ameer Hamza
on 5 Nov 2020
I edited away the License number.
Bruno Luong
on 5 Nov 2020
thanks to both of you
Vishakha Ranade
on 5 Nov 2020
Bruno Luong
on 5 Nov 2020
Edited: Bruno Luong
on 5 Nov 2020
you only need the optimization toolbox where FMINCON belongs, not the global optimization tollbox.
TMW makes this ridiculuous split. Well not totally ridiculuos since they can make more moneys with the cut.
Vishakha Ranade
on 5 Nov 2020
Bruno Luong
on 5 Nov 2020
Odd I don't own global optimization toolbox and it works for me.
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!