How can i clear all the variables in the workspace ?

3 views (last 30 days)
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.

Accepted Answer

Matt J
Matt J on 15 Nov 2013
Edited: Matt J on 15 Nov 2013
evalin('base','clear variables')

More Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!