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: CBIG_KRDNN_KRR_HCP.m
    path of file: ./repos/CBIG/stable_projects/predict_phenotypes/He2019_KRDNN/KR_HCP
    
    the code of the file until where you have to start completion: function CBIG_KRDNN_KRR_HCP(CBIG_CODE_DIR, subject_list, unrestricted_csv, restricted_csv, FD_file, FC_file, output_dir)

% CBIG_KRDNN_KRR_HCP(CBIG_CODE_DIR, subject_list, unrestricted_csv, restricted_csv, FD_file, FC_file, output_dir)
% 
% This function runs the kernel ridge regression algorithm to predict
% behavioral measures for HCP dataset. 
%
% Inputs:
%   - CBIG_CODE_DIR
%     Full path of the ThomasYeoLab/CBIG repository in your local place
%     (https://github.com/Thomas
    
function subj_list = read_sub_list(subject_text_list)
% this function will output a 1xN cell where N is the number of
% subjects in the text_list, each subject will be represented by one
% line in the text file
% NOTE: multiple runs of the same subject will still stay on the same
% line
% Each cell will contain the location of the subject, for e.g.
% '<full_path>/subject1_run1_bold.nii.gz <full_path>/subject1_run2_bold.nii.gz'
fid = fopen(subject_text_list, 'r');
i = 0;
while(1);
    tmp = fgetl(fid);
    if(tmp == -1)
        break
    else
        i = i + 1;
        subj_list{i} = tmp;
    end