Can I run a "clear java" command but still keep a variable in the workspace?
显示 更早的评论
Hi:
I am trying to run "clear java" after temporarily modifying some files in the dynamic Java path. This also clears all variables from the workspace. Is there a way to keep one or more variables in the workspace (e.g. a la clearvars)? I'm currently writing the variables I need to a temporary *.mat file, and this seems far too hacky. Thanks all!
回答(2 个)
Elias Gule
2015-3-16
0 个投票
I guess you can store those java variables in a structure and run "clear java"; the variables should still be available in the structure;
类别
在 帮助中心 和 File Exchange 中查找有关 Call Java from MATLAB 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!