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

 Risposta accettata

Walter Roberson
Walter Roberson il 18 Dic 2018

40 voti

clearvars -except NAME

2 Commenti

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

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by