MATLAB: Delete only figure objects from workspace MATLAB 2015a

clearfigurehandleworkspace

I just started using matlab with the new figure handles which now no longer are just a number, but an object of sorts.
Currently I am working with som old scripts that store a lot of different figure handles which I need to delete. I can obviously delete them one at a time, but its a lot of objects, and the names may vary every time the script run.
The reason that I need to delete the handles is that I need to store the entire workspace except for the figure handles as they produce a warning in 2015a (and possible earlier releases?).
Is there a way to use functions like clear() to delete only figure handles from the workspace in 2015a?

Best Answer

As per the documentation of close:
close all deletes all figures whose handles are not hidden.
close all hidden deletes all figures including those with hidden handles.
close all force deletes all figures, including GUIs for which CloseRequestFcn has been altered to not close the window.
Note that you can also pass an array of handles to delete which should have the same effect.