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: clone.m
    path of file: ./repos/spm12/@meeg
    
    the code of the file until where you have to start completion: function new = clone(this, fnamedat, dim, reset, forcefloat)
% Creates a copy of the object with a new, empty data file,
% possibly changing dimensions
% FORMAT new = clone(this, fnamedat, dim, reset)
% reset - 0 (default) do not reset channel or trial info unless dimensions
%          change, 1 - reset channels only, 2 - trials only, 3 both
% forcefloat - force the new data file to be float (0 by default)
%          this is to fix an issue with TF analysis of files using int16
%          for the raw data
% Note that when fnamedat comes with a path, the cloned meeg object uses
% it. Otherwise, its path is by definition that of the meeg object to be
% cloned.
% _________________________________________________________________________
% Copyright (C) 2008-2012 Wellcome Trust Centre for Neuroimaging

    
function new = clone(this, fnamedat, dim, reset, forcefloat)
% Creates a copy of the object with a new, empty data file,
% possibly changing dimensions
% FORMAT new = clone(this, fnamedat, dim, reset)
% reset - 0 (default) do not reset channel or trial info unless dimensions
%          change, 1 - reset channels only, 2 - trials only, 3 both
% forcefloat - force the new data file to be float (0 by default)
%          this is to fix an issue with TF analysis of files using int16
%          for the raw data
% Note that when fnamedat comes with a path, the cloned meeg object uses
% it. Otherwise, its path is by definition that of the meeg object to be
% cloned.
% _________________________________________________________________________
% Copyright (C) 2008-2012 Wellcome Trust Centre for Neuroimaging

% Stefan Kiebel, Vladimir Litvak
% $Id: clone.m 7449 2018-10-16 13:52:04Z vladimir $

if nargin < 5
    forcefloat = 0;
end