You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: dockexample.m
    path of file: ./repos/BioSigKit/LayoutLib/layoutdoc/Examples
    
    the code of the file until where you have to start completion: function dockexample()
%DOCKEXAMPLE: An example of using the panelbox dock/undock functionality

%   Copyright 2009-2013 The MathWorks Ltd.

% Create the window and main layout
fig = figure( 'Name', 'Dockable GUI example', ...'
    'NumberTitle', 'off', ...
    'Toolbar', 'none',
    
function nCloseAll( ~, ~ )
        % User wished to close the application, so we need to tidy up
        
        % Delete all windows, including undocked ones. We can do this by
        % getting the window for each panel in turn and deleting it.
        for ii=1:numel( panel )
            if isvalid( panel{ii} ) && ~strcmpi( panel{ii}.BeingDeleted, 'on' )
                figh = ancestor( panel{ii}, 'figure' );
                delete( figh );
            end