Undefined function 'classifyBoundsOnVars' for input arguments of type 'double'.

1 次查看(过去 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.

回答(1 个)

Mudambi Srivatsa
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.

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by