Error using fminsearch: No class * can be located on Java class path

1 回表示 (過去 30 日間)
Martin Chavez
Martin Chavez 2014 年 4 月 23 日
回答済み: Martin Chavez 2014 年 4 月 23 日
Hello,
I'm experiencing some problems when executing fminserach with R2012a 32 bits. Always when I use the plotting option @optimplotfval the function crashes with the following error:
  • Error using javaMethodEDT
  • No class com.mathworks.toolbox.optim.OptimGUI can be located on Java class path
  • Error in callAllOptimPlotFcns (line 78)
  • optimtoolGui =
  • javaMethodEDT('getOptimGUI','com.mathworks.toolbox.optim.OptimGUI');
The problem appears also when trying to do the example in the documentation with the function onehump (you can search for this in the help). The error is new to me (it worked before) and one colleague with a different computers gets it too.
I hope you can help me on solving this problem.
Bye Dr. Martin Chavez

回答 (2 件)

Alan Weiss
Alan Weiss 2014 年 4 月 23 日
This code works for me:
x = fminsearch(@(x)sin(x(1))*cos(x(2)),[-2,1],optimset('PlotFcns',@optimplotfval))
x =
-1.5708 0.0000
Perhaps you should call
rehash toolboxcache
If the problem persists, I suggest that you contact technical support.
Alan Weiss
MATLAB mathematical toolbox documentation

Martin Chavez
Martin Chavez 2014 年 4 月 23 日
Hi Alan,
Thanks four your help but this did not wor for me. I get exactly the same error.
Bye, Martin Chavez

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by