clear;clc;

cd /home/subhadip/Autism_AnatNet/austistic_study/Diffusion_Analysis
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%specify the subject directories

subjdir=dir('aH*');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Parellalize the processing
[status currdir] = system([ ' FSLMACHINELIST="machine1 machine1 machine1 machine1 machine1 " ' ])
[status currdir] = system([ ' FSLREMOTECALL=ssh ' ])
[status currdir] = system([ ' export FSLMACHINELIST FSLREMOTECALL ' ])

for l=11:30%length(subjdir)
[status currdir] = system([ ' bedpostx ' subjdir(l).name ]);
end