% function   selection = pickout(in,testcol,min,max,outcolumns)
%
% in is the input matrix; testcol is, for example, the column 
% representing time; min is the minimum time to select; max is the
% maximum time to select; outcolumns, in the form [#,#,#,...] are
% the columns to be selected, in the order they are to be arranged.
%
% Written by Ari W. Epstein in December, 1992

function selection = pickout(in,testcol,min,max,outcolumns)

rows=find(in(:,testcol)>=min & in(:,testcol)<=max);
selection=in(rows,outcolumns);
 
