function [t_in,t_out,x_in,x_out]=splitsets(in,out,select,total);
theLength=size(in,1);
theList=1:theLength;
for j=1:size(out,2)
  x_set=1+fix((select-1)/total*theLength):fix(select/total*theLength);
  t_set=setdiff(theList,x_set);
  t_in=in(t_set,:);
  t_out=out(t_set,:);
  x_in=in(x_set,:);
  x_out=out(x_set,:);
end
