patternsearch error: undefined function
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Nathanael Kazmierczak
il 28 Mag 2017
Commentato: Walter Roberson
il 10 Set 2017
I am attempting to run a patternsearch optimization for the first time. When I run the default patternsearch example (using https://www.mathworks.com/help/gads/patternsearch.html), I get the following error:
>> UnconstrainedPatternSearchMinimizationExample
Undefined function 'patternsearch' for input arguments of type
'function_handle'.
Error in UnconstrainedPatternSearchMinimizationExample (line 17)
x = patternsearch(fun,x0)
It appears that I have the global optimization toolbox installed, and furthermore that patternsearch is recognized as a function just like any of the other optimizers:
>> ver
----------------------------------------------------------------------------------------------------
MATLAB Version: 9.1.0.441655 (R2016b)
MATLAB License Number: STUDENT
Operating System: Mac OS X Version: 10.12.3 Build: 16D32
Java Version: Java 1.7.0_75-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MATLAB Version 9.1 (R2016b)
Simulink Version 8.8 (R2016b)
Control System Toolbox Version 10.1 (R2016b)
Curve Fitting Toolbox Version 3.5.4 (R2016b)
DSP System Toolbox Version 9.3 (R2016b)
Database Toolbox Version 7.0 (R2016b)
Global Optimization Toolbox Version 3.4.1 (R2016b)
Image Processing Toolbox Version 9.5 (R2016b)
Instrument Control Toolbox Version 3.10 (R2016b)
Neural Network Toolbox Version 9.1 (R2016b)
Optimization Toolbox Version 7.5 (R2016b)
Parallel Computing Toolbox Version 6.9 (R2016b)
Signal Processing Toolbox Version 7.3 (R2016b)
Simulink Control Design Version 4.4 (R2016b)
Statistics and Machine Learning Toolbox Version 11.0 (R2016b)
Symbolic Math Toolbox Version 7.1 (R2016b)
K>>
K>> exist('lsqnonlin')
ans =
2
K>> exist('patternsearch')
ans =
2
Any ideas about what the problem here might be? I'm running R2016b on a Mac Air.
Thanks,
Nathanael Kazmierczak
2 Commenti
Paul Kolodziej
il 10 Set 2017
Modificato: Walter Roberson
il 10 Set 2017
Nathanael, did you ever resolve your issue? I'm having the same problem and I contacted technical support, but I was wondering if you could help me out.
Walter Roberson
il 10 Set 2017
What shows up for
which -all patternsearch
?
The problems described by the original author would be consistent with having installed the Global Optimization Toolbox, but with there being no license found for it.
Risposta accettata
Star Strider
il 28 Mag 2017
You may have path problems.
Run these from your Command Window (or a script):
restoredefaultpath
rehash toolboxcache
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!