Can I run a "clear java" command but still keep a variable in the workspace?
Mostrar comentarios más antiguos
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!
Respuestas (2)
Elias Gule
el 16 de Mzo. de 2015
0 votos
I guess you can store those java variables in a structure and run "clear java"; the variables should still be available in the structure;
1 comentario
Jered Wells
el 16 de Mzo. de 2015
Guillaume
el 16 de Mzo. de 2015
0 votos
The documentation of clear is very clear (!). Only class definitions and import are not cleared by clear java. The only way to keep your variables is indeed to save and restore them.
1 comentario
Jered Wells
el 16 de Mzo. de 2015
Categorías
Más información sobre Call Java from MATLAB en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!