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: mergeconfig.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8/external/fieldtrip/private
    
    the code of the file until where you have to start completion: function input = mergeconfig(input, default)

% MERGECONFIG merges the fields of a default structure into an input
% configuration structure
%
% Use as
%   output = mergeconfig(input, default)


    
function input = mergeconfig(input, default)

% MERGECONFIG merges the fields of a default structure into an input
% configuration structure
%
% Use as
%   output = mergeconfig(input, default)

% Copyright (C) 2009-2012, Robert Oostenveld
%
% $Id: mergeconfig.m 7123 2012-12-06 21:21:38Z roboos $

if isempty(input) && ~isstruct(input)
  % ensure that it is an empty struct, not an empty double
  input = struct;
end