
%Changes in (search for BATCHMJ):
%spm_spm_ui
%spm_result_ui
%spm_getSPM
%spm_conman
%spm_render
%spm_input_ui

for Ind=1:3%4
    if Ind==1
        SubgroupDir='All' 
        StatsDesign=['One sample t-test'];
    elseif Ind==2
        SubgroupDir='Female' 
        StatsDesign=['One sample t-test'];
    elseif Ind==3
        SubgroupDir='Male' 
        StatsDesign=['One sample t-test'];
    elseif Ind==4
        SubgroupDir='Gender' 
        StatsDesign=['Two sample t-test'];
    end
    FemaleVec=[7 9 10 11 13 14 16 17 18 20 22]
    MaleVec  =[2 3 4  5  6  12 15 21 23 24 25]
    if strcmp(SubgroupDir,'All') | strcmp(SubgroupDir,'Gender')
        SubVec=[MaleVec,FemaleVec]
    elseif strcmp(SubgroupDir,'Female')
        SubVec=FemaleVec
    elseif strcmp(SubgroupDir,'Male')
        SubVec=MaleVec
    end
    
    IndVec1=MaleVec
    NIndVec1=length(IndVec1)
    IndVec2=FemaleVec
    NIndVec2=length(IndVec2)
    IndVec=[ones(size(IndVec1)),2.*ones(size(IndVec2))]
    
    ConStart=123;
    ConEnd=128;
    Batch2ndLevel(ConStart,ConEnd,SubVec,SubgroupDir,StatsDesign)
    BatchResults(ConStart,ConEnd,SubVec,SubgroupDir)
end