%% Close All Figures with Visible or Hidden Handles
% Create three figures, each with a line plot. Set the HandleVisibility property of the last figure to 'off'.

f1 = figure;
plot(1:10)
f2 = figure;
plot((1:10).^2)
f3 = figure('HandleVisibility','off');
plot(1./(1:10))

%
% Close all of the figures. Notice that you cannot close f3 by calling close all because it has a hidden handle.

close all hidden

% Copyright 2020 The MathWorks, Inc.