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: make_plot_of_ppg_beat_detection_challenges.m
    path of file: ./repos/ppg-beats/source/figures
    
    the code of the file until where you have to start completion: function make_plot_of_ppg_beat_detection_challenges

% make 
    
function save_fig(filepath)

print(gcf, filepath, '-depsc')
fid = fopen([filepath, '.txt'], 'w');
fprintf(fid, ['Created using ' mfilename, ', ', date]);
fclose(fid);

end