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: concatFiles.m
    path of file: ./repos/matStats/matStats/@Table
    
    the code of the file until where you have to start completion: function varargout = concatFiles(inputFiles, outputFile, varargin)
% Concatenate a list of files containing tables into new a file.

    
function varargout = concatFiles(inputFiles, outputFile, varargin)
% Concatenate a list of files containing tables into new a file.
%
%   concatFiles(INPUT_FILES, OUTPUT_FILE)
%
%   Example
%   % Concatenate a list of files
%   Table.concatFiles({'tab1.txt', 'tab2.txt'}, 'grouped.txt');
%
%   % concatenate all the text files in a directory
%   Table.concatFiles('input/*.txt', 'grouped.txt');
%
%
%   See also
%     read
%

% ------
% Author: David Legland
% e-mail: david.legland@inra.fr
% Created: 2013-07-22,    using Matlab 7.9.0.529 (R2009b)
% Copyright 2013 INRA - Cepia Software Platform.

% if input is given as a pattern, compute the list of names
if ischar(inputFiles)
    [path, baseName] = fileparts(inputFiles); %#ok<ASGLU>
    list = dir(inputFiles);
    
    nFiles = length(list);
    inputFiles = cell(1, nFiles);
    for i = 1:nFiles
        inputFiles{i} = fullfile(path, list(i).name);
    end