%%spm8.m

%%specify spm8 and other toolbox path
spm8_path = 'C:\spm\spm8';
pickatlas_path = 'C:\spm\spm8\toolbox\wfu_pickatlas';
%spm-related_path = 'path_to_the_application';

% remove spm path
while true
    try
        spm_rmpath;
        catch break
    end
end

% add spm8 and related path
addpath(spm8_path,pickatlas_path);

% run spm8
spm;
