function out=vofvMadzTest(data1,nreps)
% resamples the MAD score of a vector of turn bias scores (data1),
% performing nreps replicates.

out=zeros(nreps,1);

data1(isnan(data1))=[];

n1=length(data1);

h=waitbar(0);

for i=1:nreps
    
   which1=ceil(rand(n1,1)*n1);
   data1Temp=data1(which1);
   out(i)=mad(data1Temp,1);
   waitbar(i/nreps,h);
end
    
close(h);