Clean variables of worskpace from GUIDE
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alexander
el 17 de Jun. de 2013
Comentada: Stephen23
el 16 de Ag. de 2021
Hi Everyone!
I have a problem with a code in GUIDE. I want clean some variables of workspace that previously I saved from GUIDE. To save variables in workspace, I've used this code:
if true
% assignin('base', 'VHA', VHA);
end
And to obtain variables from workspace i use evalin
if true
% evalin('base','VHA');
end
I know that 'clear' doesn't work in GUIDE. So ¿which should to use? I don't want clean all variables.
1 comentario
Respuesta aceptada
Babak
el 17 de Jun. de 2013
You can send commands to base workspace using the evalin() function as you mentioned. For example you can say:
evalin('base','who')
and to clear a variable myvarinbase say
evalin('base','clear myvarinbase')
Note that
clear var1 var2
will remove variables var1 var2 from the current workspace, not necessarily base workspace, if it is called from inside a function like a GUI.
Más respuestas (0)
Ver también
Categorías
Más información sobre Whos en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!