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: copyfig.m
    path of file: ./repos/Realtime_Multi-Person_Pose_Estimation/testing/util/ojwoodford-export_fig-5735e6d
    
    the code of the file until where you have to start completion: %COPYFIG Create a copy of a figure, without changing the figure
%
% Examples:
%   fh_new = copyfig(fh_old)
%
% This function will create a copy of a figure, but not change the figure,
% as copyobj s
    
function will create a copy of a figure, but not change the figure,
% as copyobj sometimes does, e.g. by changing legends.
%
% IN:
%    fh_old - The handle of the figure to be copied. Default: gcf.
%
% OUT:
%    fh_new - The handle of the created figure.

% Copyright (C) Oliver Woodford 2012

function fh = copyfig(fh)
% Set the default
if nargin == 0
    fh = gcf;
end