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_selectDesignMatrix.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 icatb_selectDesignMatrix(handles)
% set the spm matrices

figureData = get(handles, 'userdata');

dispParameters = figureData.dispParameters;
% count for time points information
diffTimePoints = dispParameters.diffTimePoints;
% number of subjects and sessions
numOfSub = dispParameters.numOfSub;
numOfSess = dispParameters.numOfSess;
% parameter file
paramFile = dispParameters.paramFile;
% spm matrices
spmMatrices = dispParameters.spmMatrices;
% flag for the time points
flagTimePoints = dispParameters.flagTimePoints;

% load the parameter file
load(paramFile); % (contains sesInfo structure)
subjectFile = [sesInfo.userInput.prefix, 'Subject.mat'];
outputDir = fileparts(paramFile); % get the target directory

    
function icatb_selectDesignMatrix(handles)
% set the spm matrices

figureData = get(handles, 'userdata');

dispParameters = figureData.dispParameters;
% count for time points information
diffTimePoints = dispParameters.diffTimePoints;
% number of subjects and sessions
numOfSub = dispParameters.numOfSub;
numOfSess = dispParameters.numOfSess;
% parameter file
paramFile = dispParameters.paramFile;
% spm matrices
spmMatrices = dispParameters.spmMatrices;
% flag for the time points
flagTimePoints = dispParameters.flagTimePoints;

% load the parameter file
load(paramFile); % (contains sesInfo structure)
subjectFile = [sesInfo.userInput.prefix, 'Subject.mat'];
outputDir = fileparts(paramFile); % get the target directory

% select the state of the design matrix here
questionString = 'How do you want to select the regressors for subjects and sessions?';
optionsString = str2mat('One', 'All');

D(1).string = 'These options are for sorting components temporally. Each option is explained below:';
D(size(D, 2) + 1).string = '';
% D(size(D, 2) + 1).string = 'No - Design matrix is not selected for temporal sorting.';
% D(size(D, 2) + 1).string = '';
D(size(D, 2) + 1).string = 'Same Set of regressors for all subjects and sessions - One SPM2/SPM5/SPM8 model model is used for all the subjects and sessions. Same set of regressors will be applied to all data-sets.';
D(size(D, 2) + 1).string = '';
D(size(D, 2) + 1).string = 'Different set of regressors for all sessions - One SPM2/SPM5/SPM8 model is used for all subjects and sessions. Session specific regressors will be pulled during temporal sorting.';
D(size(D, 2) + 1).string = '';
D(size(D, 2) + 1).string = 'Different set of regressors for all subjects and sessions - One SPM2/SPM5/SPM8 model is used for each subject''s session. Regressors pulled during temporal sorting will be specific to subjects''s session.';

% help details
helpDetails.str = str2mat(D.string);
clear D;
helpDetails.title = 'Options for temporal sorting';
% Options include:
% 1. Same set of regressors for all subjects and sessions (One SPM.mat
% needs to be selected and the selected regressors will be correlated
% with each data-set).
% 2. Session specific regressors will be correlated with the
% corresponding time courses.
% 3. Regressors will be specific to each data-set.

% if the number of data sets is greater than one
if numOfSub*numOfSess > 1
    % if the number of sessions is greater than one
    if numOfSub == 1 & numOfSess > 1

        D(1).string = 'Same set of regressors for all subjects and sessions';
        D(length(D) + 1).string = 'Different set of regressors for sessions';
        % if the number of subjects is greater than one
    elseif numOfSess == 1 & numOfSub > 1
        D(1).string = 'Same set of regressors for all subjects and sessions';
        D(length(D) + 1).string = 'Different set of regressors for subjects and sessions';
    else
        % show all the three cases
        D(1).string = 'Same set of regressors for all subjects and sessions';
        D(length(D) + 1).string = 'Different set of regressors for sessions';
        D(length(D) + 1).string = 'Different set of regressors for subjects and sessions';
    end