MATLAB: How can i clear all the variables in the workspace

clear all variablesMATLABsimulink

Hi,
I'm curently working on a project under Matlab. I use Simulink and GUIDE.
My problem is that I want to clear all the variables that are in the workspace by clicking on a GUI button. clear all doesn't work because the variables are not created in the same file and/or function.
How can I do to clear all the variables ?
Seb.

Best Answer

evalin('base','clear variables')