% get a handle to the xfigure class (default constructor) xfig = xfigure; % then delete all objects without further ado xfig.DeleteAllFigures; % and *then* get a fresh start clear classes;