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: RunICC_on_WholeMap.m
    path of file: ./repos/bspm/thirdparty/MRtools_2015-08-21/GLM_Flex
    
    the code of the file until where you have to start completion: function RunICC_on_WholeMap
%%% Written by Aaron Schultz (aschultz@martinos.org)
%%%
%%% Copyright (C) 2012,  Aaron P. Schultz
%%%
%%% Supported in part by the NIH funded Harvard Aging Brain Study (P01AG036694) and NIH R01-AG027435 
%%%
%%% This program is free software: you can redistribute it and/or modify
%%% it under the terms of the GNU General Public License as published by
%%% the Free Software Foundation, either version 3 of the License, or
%%% any later version.
%%% 
%%% This program is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%%% GNU General Public License for more details.

%%%  Runs ICC(2,1) from Shrout & Fleiss
load I;

    
function RunICC_on_WholeMap
%%% Written by Aaron Schultz (aschultz@martinos.org)
%%%
%%% Copyright (C) 2012,  Aaron P. Schultz
%%%
%%% Supported in part by the NIH funded Harvard Aging Brain Study (P01AG036694) and NIH R01-AG027435 
%%%
%%% This program is free software: you can redistribute it and/or modify
%%% it under the terms of the GNU General Public License as published by
%%% the Free Software Foundation, either version 3 of the License, or
%%% any later version.
%%% 
%%% This program is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%%% GNU General Public License for more details.

%%%  Runs ICC(2,1) from Shrout & Fleiss
load I;

if ~isempty(I.F.IN.Between) || numel(I.F.IN.Within)>1 || ~isempty(I.F.IN.Covar)
   error('This script can only be run on vanilla one-way repeated measures ANOVA.  No covariates, between subject terms, or multiple repeated factors are allowed.')
end

if exist('FinalDataSet.nii','file')
    h = spm_vol('FinalDataSet.nii');
else
    h = spm_vol(char(I.Scans));
end