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: icatb_returnRegressor.m
    path of file: ./repos/gift/GroupICAT/icatb/icatb_helper_functions
    
    the code of the file until where you have to start completion: function [selectedRegressors, selectedValue] = icatb_returnRegressor(refInfo, num_DataSets, numSubjects, ...
    numSessions, spmMatFlag, subject_string, flagRegressor)
% returns the selected regressor names and values
%%%%%%%%%%%%%%%%%%% DEFINE REGRESSOR GUI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% case 1: datasets = 1, regressors = 1 (no need to select the regressors)
%
    
function is used. Please select the reference function.'};
            helpDetails.str = str;
            
            
            if ~strcmpi(METHOD_ENTERING_REGRESSORS, 'batch')

                selIndex = icatb_listdlg('PromptString', promptStr, ...
                    'SelectionMode','single', 'ListString', refNames, 'listsize', listsize, 'movegui', 'center', ...
                    'windowstyle', 'modal', 'help', helpDetails);
            else
                selIndex = 1;
            end