function timeindex=time2index(t, t_line1)
%TIME2INDEX converts time (s) to an index value

indexArray=find(t_line1>=t);
timeindex=indexArray(1); 

