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: reset_SPMcfg.m
    path of file: ./repos/CanlabCore/CanlabCore/diagnostics
    
    the code of the file until where you have to start completion: function reset_SPMcfg()
% resets columns in SPMcfg by removing all non-intercept nuisance covariates.
% runs on the SPMcfg.mat file in the current directory


    
function reset_SPMcfg()
% resets columns in SPMcfg by removing all non-intercept nuisance covariates.
% runs on the SPMcfg.mat file in the current directory

    if exist([pwd filesep 'SPMcfg.mat']) == 2
        load SPMcfg
    else
        warning(['No SPMcfg.mat file found in current directory:' pwd])
    end
    
    nsess=length(Sess);
    xX.X(:,xX.iB(1:end