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: trajectoriesHeatMap.m
    path of file: ./repos/trajectory-based-ship-classification/Illustrations/Figure 4/a
    
    the code of the file until where you have to start completion: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Desarrollado por | Developed by:                     %
% University Carlos III of Madrid PhD Researchers      %
% Daniel Amigo Herrero    mailto: damigo@inf.uc3m.es   %
% David Sanchez Pedroche  mailto: davsanch@inf.uc3m.es %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
function trajectoriesHeatMap()

close all;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PREPARACI�N DE VARIABLES, CARPETAS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Variables que definen el fichero a procesar
modeImage = 0; % 0: puntos en Scatter | 1: MMSI en scatter usando Cleaned y sus errores | 2: heatmap del tipo de barco

% Lugar donde sacar la imagen
currentFilePath = mfilename('fullpath');
aux = split(currentFilePath, '\');
currentPath = "";
for i=1:length(aux)-1
    currentPath = strcat(currentPath, aux{i}, "/");
end