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: genmexgatewaystring.m
    path of file: ./repos/robotics-toolbox-matlab/@CodeGenerator/private
    
    the code of the file until where you have to start completion: %GENMEXGATEWAYSTRING Generates a mex gateway function
%
% [FUNSTR] = genmexgatewaystring(SYMEXPR, ARGLIST) returns a string
% representing a C-code implementation of a mex gateway function.
%
% The argumentlist ARGLIST may contain the following property-value pairs
%   PROPERTY, VALUE
% - 'funname', 'name_string'
%   'name_string' is the identifier of the actual computational C-function
%    called by the gateway routine. If this optional argument is omitted, 
%    the identifier 'myfun' is used
%
% - 'vars', {symVar1, symVar2,...}
%    The inputs to the actual computational C-code function called by the 
%    gateway routine must be defined as a cell array. The elements of this 
%    cell array contain the symbolic variables required to compute the 
%    output. The elements may be scalars, vectors or matrices symbolic 
%    variables. 
%
% Example::
% % Create symbolic variables
% syms q1 q2 q3
% 
% Q = [q1 q2 q3];
% % Create symbolic expression
% myrot = rotz(q3)*roty(q2)*rotx(q1)
% 
% % Generate C-function string
% [funstr] = genmexgatewaystring(myrot,'vars',{Q},'funname','rotate_xyz')
%
% Notes::
%
%
% Author::
%  Joern Malzahn, (joern.malzahn@tu-dortmund.de)
%
% See also ccode, ccodefunctionstring.

% Copyright (C) 2012-2014, by Joern Malzahn
%
% This file is part of The Robotics Toolbox for Matlab (RTB).
%
% RTB is free software: you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% RTB is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU Lesser General Public License for more details.
%
% You should have received a 
    
function
%
% [FUNSTR] = genmexgatewaystring(SYMEXPR, ARGLIST) returns a string
% representing a C-code implementation of a mex gateway function.
%
% The argumentlist ARGLIST may contain the following property-value pairs
%   PROPERTY, VALUE
% - 'funname', 'name_string'
%   'name_string' is the identifier of the actual computational C-function
%    called by the gateway routine. If this optional argument is omitted, 
%    the identifier 'myfun' is used
%
% - 'vars', {symVar1, symVar2,...}
%    The inputs to the actual computational C-code function called by the 
%    gateway routine must be defined as a cell array. The elements of this 
%    cell array contain the symbolic variables required to compute the 
%    output. The elements may be scalars, vectors or matrices symbolic 
%    variables. 
%
% Example::
% % Create symbolic variables
% syms q1 q2 q3
% 
% Q = [q1 q2 q3];
% % Create symbolic expression
% myrot = rotz(q3)*roty(q2)*rotx(q1)
% 
% % Generate C-function string
% [funstr] = genmexgatewaystring(myrot,'vars',{Q},'funname','rotate_xyz')
%
% Notes::
%
%
% Author::
%  Joern Malzahn, (joern.malzahn@tu-dortmund.de)
%
% See also ccode, ccodefunctionstring.

% Copyright (C) 2012-2014, by Joern Malzahn
%
% This file is part of The Robotics Toolbox for Matlab (RTB).
%
% RTB is free software: you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% RTB is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU Lesser General Public License for more details.
%
% You should have received a copy of the GNU Leser General Public License
% along with RTB.  If not, see <http://www.gnu.org/licenses/>.
%
% http://www.petercorke.com


function [ gwstring ] = genmexgatewaystring(CGen, f, varargin )

%% Read parameters
% option defaults
opt.funname = 'myfun';
opt.output{1} = zeros(size(f));
opt.vars = {};

% tb_optparse is not applicable here,
% since handling cell inputs and extracting input variable names is
% required. Thus, scan varargin manually:
if mod(nargin,2)~=0
    error('CodeGenerator:genmexgatewaystring:wrongArgumentList',...
        'Wrong number of elements in the argument list.');
end