フィルターのクリア

How to solve Error:Unexpected MATLAB expression. workspacefunc 287

3 ビュー (過去 30 日間)
Nan Wu
Nan Wu 2015 年 5 月 4 日
コメント済み: FAS 2022 年 4 月 8 日
When I double click the variable in workspace, the error dialog box comes up, indicates
readonly
Error: Unexpected MATLAB expression. workspacefunc 287
And also the followings show in the command window:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: [D cannot be cast to [Z
at com.mathworks.mlwidgets.array.ValuePanel$ROML.matlabEvent(ValuePanel.java:251)
at com.mathworks.jmi.MatlabMCR$AWTReplyEvent.run(MatlabMCR.java:1636)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at com.mathworks.mwswing.MJDialog.show(MJDialog.java:311)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at com.mathworks.mwswing.MJOptionPane.showOptionDialog(MJOptionPane.java:539)
at com.mathworks.mwswing.MJOptionPane.showMessageDialog(MJOptionPane.java:435)
at com.mathworks.mwswing.MJOptionPane.showMessageDialog(MJOptionPane.java:425)
at com.mathworks.mlwidgets.array.ArrayDialog$1.run(ArrayDialog.java:49)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: [D cannot be cast to [Z
at com.mathworks.mlwidgets.array.ValuePanel$ROML.matlabEvent(ValuePanel.java:251)
at com.mathworks.jmi.MatlabMCR$AWTReplyEvent.run(MatlabMCR.java:1636)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at com.mathworks.mwswing.MJDialog.show(MJDialog.java:311)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at com.mathworks.mwswing.MJOptionPane.showOptionDialog(MJOptionPane.java:539)
at com.mathworks.mwswing.MJOptionPane.showMessageDialog(MJOptionPane.java:435)
at com.mathworks.mwswing.MJOptionPane.showMessageDialog(MJOptionPane.java:425)
at com.mathworks.mlwidgets.array.ArrayDialog$1.run(ArrayDialog.java:49)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at com.mathworks.mwswing.MJDialog.show(MJDialog.java:311)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at com.mathworks.mwswing.MJOptionPane.showOptionDialog(MJOptionPane.java:539)
at com.mathworks.mwswing.MJOptionPane.showMessageDialog(MJOptionPane.java:435)
at com.mathworks.mwswing.MJOptionPane.showMessageDialog(MJOptionPane.java:425)
at com.mathworks.mlwidgets.array.ArrayDialog$1.run(ArrayDialog.java:49)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

回答 (2 件)

Cindy Solomon
Cindy Solomon 2015 年 5 月 6 日
編集済み: Cindy Solomon 2015 年 5 月 6 日
Hi Nan,
Do you have any user-defined functions called builtin, strjoin, or strsplit? MATLAB has these defined internally, and having any outside functions that shadow these built-in ones would result in this error. If you are unsure if you have created such functions, typing the command:
>> which functionName -all
will show you the path to all items on the MATLAB path with the name "functionName"
Hope this helps!
Cindy
  6 件のコメント
Anil Thota
Anil Thota 2017 年 5 月 1 日
One of the third party plugin has strjoin function. Unloading the plugin using your suggestion solved the problem. Thanks
FAS
FAS 2022 年 4 月 8 日
Yes, this is the perfect solution.

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


RAJASHEKAR MAIDA
RAJASHEKAR MAIDA 2015 年 12 月 15 日
Hi ,
I had the same problem while using simulink .As I removed them now I have encountered with a new problem .
Previously accessible file "C:\Program Files\MATLAB\R2015a\toolbox\matlab\strfun\strread.m" is now inaccessible.
Error in javaclasspath>local_get_static_path (line 318) p = strread(sp,'%s','delimiter',pathsep);
Error in javaclasspath>local_javapath (line 169) pathout = local_get_static_path;
Error in javaclasspath (line 81) p = local_javapath(a);
Error in javaclasspath>local_javapath (line 174) sp = javaclasspath('-static');
Error in javaclasspath (line 81) p = local_javapath(a);
Error in connector.internal.initClassLoader (line 4)
Error in connectorHandler (line 25)
Error in connector (line 10) connectorHandler(action, varargin{:});
Error in connector.internal.autostart.run (line 10)
Can we recover those removed folders ?
  1 件のコメント
Jan
Jan 2017 年 10 月 30 日
編集済み: Jan 2017 年 10 月 30 日
This is an old thread, but for all readers:
You have removed what? The files from Matlab's toolbox?! If so, restore them. Never remove a function from Matlab's toolboxes, but the user-defined versions, which shadow the original functions.
Can we recover those removed folders?
Either recover them from the location where you have moved them to (you did not delete them, did you?). Or from the backup (you do have a backup, don't you?). Or use the "previous versions" under Windows (you do have enabled this, don't you?).

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

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by