MATLAB: What is the difference between the effect of clear and clearvars

clear

What is the difference between the effect of clear and clearvars?

Best Answer

clearvars just clears variables you specify, in the way you specify.
clear is more powerful in the sense you can clear variables, variables, functions, compiled scripts, MEX-functions
Check our the doc for more info: