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: addPathTiGL.m
    path of file: ./repos/LADAC/utilities/interfaces_external_programs/TiGL_CPACS
    
    the code of the file until where you have to start completion: function addPathTiGL(TiGL_version)
% addPathTiGL adds the Matlab functions from TiGL and TiXI to the Matlab
%   path.
%   This function only works if TiGL and TiXI are installed:
%       Install TiGL: https://github.com/DLR-SC/tigl
%       Install TiXI: https://github.com/DLR-SC/tixi
%   If there are multiple installations of TiXI, the newest version will be
%   added to the Matlab path (this should not cause problems).
% 
% Inputs:
%   TiGL_version        Version of the to be added TiGL (string). The
%                       version should be equal to the name of the TiGL
%                       directory, e.g. '2.3.3' if the name of the TiGL
%                       directory is TiGL 2.3.3
% 
% Example:
%   addPathTiGL('3.0.0')
% 

% Disclamer:
%   SPDX-License-Identifier: GPL-3.0-only
% 
%   Copyright (C) 2020-2022 Yannic Beyer
%   Copyright (C) 2022 TU Braunschweig, Institute of Flight Guidance
% *************************************************************************

%% Set pathes (this can be modified)

% potential parent directorys of the TiGL and TiXI directory
% --> FEEL FREE TO ADD OTHER POTENTIAL DIRECTORIES
possible_paths = { ...
    'C:/Program Files'; ...
    'C:/Program Files (x86)'; ...
    '/usr/local/lib'; ...
    '/usr/local/share' ...
    };

% possible path to the matlab directory from the TiGL directory
% (This works for version 2 and 3)
TiGL_subfolder = { ...
            '/share/tigl/matlab'; ...
            '/share/tigl3/matlab' ...
            };
        

    
function addPathTiGL(TiGL_version)
% addPathTiGL adds the Matlab functions from TiGL and TiXI to the Matlab
%   path.
%   This function only works if TiGL and TiXI are installed:
%       Install TiGL: https://github.com/DLR-SC/tigl
%       Install TiXI: https://github.com/DLR-SC/tixi
%   If there are multiple installations of TiXI, the newest version will be
%   added to the Matlab path (this should not cause problems).
% 
% Inputs:
%   TiGL_version        Version of the to be added TiGL (string). The
%                       version should be equal to the name of the TiGL
%                       directory, e.g. '2.3.3' if the name of the TiGL
%                       directory is TiGL 2.3.3
% 
% Example:
%   addPathTiGL('3.0.0')
% 

% Disclamer:
%   SPDX-License-Identifier: GPL-3.0-only
% 
%   Copyright (C) 2020-2022 Yannic Beyer
%   Copyright (C) 2022 TU Braunschweig, Institute of Flight Guidance
% *************************************************************************

%% Set pathes (this can be modified)

% potential parent directorys of the TiGL and TiXI directory
% --> FEEL FREE TO ADD OTHER POTENTIAL DIRECTORIES
possible_paths = { ...
    'C:/Program Files'; ...
    'C:/Program Files (x86)'; ...
    '/usr/local/lib'; ...
    '/usr/local/share' ...
    };

% possible path to the matlab directory from the TiGL directory
% (This works for version 2 and 3)
TiGL_subfolder = { ...
            '/share/tigl/matlab'; ...
            '/share/tigl3/matlab' ...
            };
        
% possible path to the matlab directory from the TiXI directory
% (This works for version 2 and 3)
TiXI_subfolder = { ...
            '/share/tixi/matlab'; ...
            '/share/tixi3/matlab'; ...
            '/matlab' ...
            };

%% find TiGL and TiXI and add to path (this should not be modified)

num_path = length( possible_paths );
TiGL_folder_names = { ...
            'tigl'; ...
            ['TIGL ', TiGL_version] ...
            };

% init variables
TiGL_path_found = false;
TiGL_matlab_path_found = false;
TiXI_path_found = false;
TiXI_matlab_path_found = false;

for i = 1:num_path
    
    % find the TIGL directory
    for ii = 1:length(TiGL_folder_names)
        TiGL_path = [ possible_paths{i}, '/', TiGL_folder_names{ii} ];
        if exist( TiGL_path, 'dir' )
            TiGL_path_found = true;
            for j = 1:length(TiGL_subfolder)
                if exist( [ TiGL_path, TiGL_subfolder{j} ], 'dir' ) 
                    % add to path TIGL subdirectory
                    addpath( [ TiGL_path, TiGL_subfolder{j} ] );
                    TiGL_matlab_path_found = true;
                end