patternsearch error: undefined function

3 ビュー (過去 30 日間)
Nathanael  Kazmierczak
Nathanael Kazmierczak 2017 年 5 月 28 日
コメント済み: Walter Roberson 2017 年 9 月 10 日
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 件のコメント
Paul Kolodziej
Paul Kolodziej 2017 年 9 月 10 日
編集済み: Walter Roberson 2017 年 9 月 10 日
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
Walter Roberson 2017 年 9 月 10 日
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.

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2017 年 5 月 28 日
You may have path problems.
Run these from your Command Window (or a script):
restoredefaultpath
rehash toolboxcache
If those don’t work, Contact Support (link). You may have to reinstall everything.
  2 件のコメント
Nathanael  Kazmierczak
Nathanael Kazmierczak 2017 年 5 月 28 日
Thanks for the suggestion. I executed those commands, but am still having the same problem. I've contacted Technical Support.
Star Strider
Star Strider 2017 年 5 月 28 日
My pleasure.
You have my sympathies.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction 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