Undefined function 'classifyBoundsOnVars' for input arguments of type 'double'.
2 次查看(过去 30 天)
显示 更早的评论
Hello,
I am trying to run fmincon and I am getting the following error
Undefined function 'classifyBoundsOnVars' for input arguments of type 'double'.
Error in fmincon (line 499)
xIndices = classifyBoundsOnVars(l,u,sizes.nVar,true);
when I put in the command window:
open classifyBoundsOnVars
it appears:
Error using open (line 85)
File 'classifyBoundsOnVars' not found.
This means the function doesn't exist. i am wondering why I cannot run the optimization and why I don't have the 'classifyBoundsOnVars' function.
0 个评论
回答(1 个)
Mudambi Srivatsa
2017-6-26
Use the following command and see if these functions are present on your computer.
>> which -all fmincon
>> which -all classifyBoundsOnVars
'fmincon' function does not come with base MATLAB and it is in the Optimization toolbox, so please also check if you have this toolbox on your license.
If there is no issue with the installation and license, the output for the above commands will be as follows:
<C:\Program Files\MATLAB\R2017a\toolbox\shared\optimlib\fmincon.p>
<C:\Program Files\MATLAB\R2017a\toolbox\shared\optimlib\fmincon.m> % Shadowed
<C:\Program Files\MATLAB\R2017a\toolbox\shared\optimlib\private\classifyBoundsOnVars.m> % Private to optimlib
Also check if the output of the “ver –support” lists the Optimization Toolbox. Try reinstalling the Optimization toolbox if nothing else works. To reinstall it, you can use the “Add-Ons Manager” feature.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!