MATLAB: Clear all axes handles in GUI

axesclearguiMATLAB

I have a GUI that plots 4 axes in a GUI and I would like to clear those with a button. Tried cla(findall(0,'type','axes')) but it does not do anything. what is wrong with this command?

Best Answer

arrayfun(@cla,findall(0,'type','axes'))