How do i clear all except one variable?

I want to clear all variables except one
entering all variable to be cleared is a lengthy process, has many variables and function

 Réponse acceptée

Walter Roberson
Walter Roberson le 18 Déc 2018

40 votes

clearvars -except NAME

2 commentaires

Thankyou it worked
clearvars -except X %deletes all variables except X in workspace

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Control System Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by