% assumes num_files is the number of data files
% stores resulting distributions in dists

for qqq_i = 0 : num_files-1
  qqq_filename = make_name("d",qqq_i,".dat");
  eval(sprintf("load -force %s;",qqq_filename),0);
endfor

qqq_sizes = size(d0000);
dists = zeros(qqq_sizes(1),4*num_files);
for qqq_i = 0 : num_files-1
  qqq_data = make_name("d",qqq_i,"");
  eval(sprintf("dists(:,%d:%d) = %s;",qqq_i*4+1, qqq_i*4+4, qqq_data));
  eval(sprintf("clear %s;",qqq_data));
endfor

clear qqq_sizes
clear qqq_data
clear qqq_filename
clear qqq_i
