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: cat_batch_long.m
    path of file: ./repos/ExploreASL/External/SPMmodified/toolbox/cat12
    
    the code of the file until where you have to start completion: function cat_batch_long(namefile,output_surface,cat_defaults)
% wrapper for using batch mode (see cat_batch_long.sh)
%
% namefile       - array of file names
% output_surface - enable surface estimation
% cat_defaults   - use this default file instead of cat_defaults.m
%_______________________________________________________________________
% $Id: cat_batch_long.m 1528 2019-12-03 11:41:21Z gaser $

if nargin < 1
	fprintf('Syntax: cat_batch_long(namefile)\n');
	exit

    
function cat_batch_long(namefile,output_surface,cat_defaults)
% wrapper for using batch mode (see cat_batch_long.sh)
%
% namefile       - array of file names
% output_surface - enable surface estimation
% cat_defaults   - use this default file instead of cat_defaults.m
%_______________________________________________________________________
% $Id: cat_batch_long.m 1528 2019-12-03 11:41:21Z gaser $

if nargin < 1
	fprintf('Syntax: cat_batch_long(namefile)\n');
	exit
end

if nargin < 2
  output_surface = 0;
else
  % string argument has to be converted 
  if isstr(output_surface)
    output_surface = str2num(output_surface);
  end