You can send commands to base workspace using the evalin() function as you mentioned. For example you can say:
and to clear a variable myvarinbase say
evalin('base','clear myvarinbase')
Note that
will remove variables var1 var2 from the current workspace, not necessarily base workspace, if it is called from inside a function like a GUI.
Best Answer