FUNCTION REFERENCE
clearvars
Clear selected workspace variables.
Clear selected workspace variables.
Syntax
clearvars v1 v2 ...; clearvars ... -except k1 k2 ...; clearvars -regexp pattern ...; clearvars -global ...Names may contain * wildcards. -regexp makes the following names regular expressions; -except keeps matching variables; -global selects among all global variables, including those declared only inside functions, and clears their global values.
Example
a = 1; b = 2; clearvars a; exist('a') % 0Differences from MATLAB: none known for these forms.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.