How to Clear all Variables of a Workspace Except for Those Explicitly Excluded?
65 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Rightia Rollmann
el 15 de Mzo. de 2017
How do I clear all variables of a workspace except for those that I explicitly mention not to be cleared?
0 comentarios
Respuesta aceptada
Jan
el 15 de Mzo. de 2017
Editada: Jan
el 15 de Mzo. de 2017
clearvars -except keepVariables
I recommend to use functions. Then there is no need to clear workspace variables. For larger projects it is very useful, if the workspace is kept clean, instead of applying method to clean them manually.
0 comentarios
Más respuestas (1)
Ver también
Categorías
Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!