How to Clear all Variables of a Workspace Except for Those Explicitly Excluded?
60 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How do I clear all variables of a workspace except for those that I explicitly mention not to be cleared?
0 commentaires
Réponse acceptée
Jan
le 15 Mar 2017
Modifié(e) : Jan
le 15 Mar 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 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Workspace Variables and MAT-Files dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!