matlab clear all variables except one code example Example: clear all but matlab clearvars -except NAME