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: D_FfdrGNDTest.m
    path of file: ./repos/FMUT/testing
    
    the code of the file until where you have to start completion: %Test FfdrGND function
%
%AUTHOR: Eric Fields
%VERSION DATE: 12 June 2020

global te
    
function
%
%AUTHOR: Eric Fields
%VERSION DATE: 12 June 2020

global test_xls_output
if isempty(test_xls_output)
    test_xls_output = true;
end

%Load a GND for testing
%Load a GND for testing
FMUT_dir = fileparts(fileparts(which('A_setupTest')));
load(fullfile(FMUT_dir, 'testing', 'data', 'EmProb_13subs_Test.GND'), '-mat');

%Define general variables
time_wind = [500, 800];
[~, start_sample] = min(abs( GND.time_pts - time_wind(1) ));
[~, end