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_getInfo_EventAvg.m
    path of file: ./repos/bspm/thirdparty/MIALAB/GroupICATv4.0a/icatb/icatb_helper_functions
    
    the code of the file until where you have to start completion: function appData = icatb_getInfo_EventAvg(listString, refAppData, numComp, handleVisibility)
% list dil
    
function okCallback(hObj, event_data, handles)
% ok callback

% get the user data of the ok pushbutton
okData = get(hObj, 'userdata');

% component list box
compListH = findobj(handles, 'tag', 'componentListbox');
component_number = get(compListH, 'value');

% subject and session listboxes
subjectH = findobj(handles, 'tag', 'subjectListbox');
subject_str = get(subjectH, 'string');
% select for a particular component
try
    
    % check regressor info
    for ii = 1:length(okData)
        %selectedRegressor = okData(ii).selectedRegressor;
        if isempty(okData(ii).regressorInfo(1).selectedRegressor)
            error(['Regressor is not selected for ', deblank(subject_str(ii, :))]);
        end