title: identify the row in my time vector where the time is 5 seconds before the last printed time, times are however in milliseconds
body: <p>My matrix has a coloumn with times in it - times are in milliseconds (milliseconds since midnight - but dont worry about that). </p>
  
  <p>I need to identify the row where the time is 5 seconds less than the last time in the matrix 
  this is because i am going to loop through the matrix and look at data 5 seconds ahead so I need to know where to end my
  for i = 1:rows in matrix minus wherever we hit the last 5 seconds so if looking 5 seconds forward we dont exceed the matrix dimensions. </p>
  
  <p>So lets pretend the time is in coloumn 2 of the matrix 
  and we have 
  [rows,coloums] = size(matrix)</p>
  
  <p>the last time stamp in the matrix  is (rows,2) and returns  time in milliseconds since midnight as for example  53997401 so 5 seconds before or my marker is therefor (53997401-5000) </p>
  
  <p>therefor I am looking to find the last time in coloumn2 which is before the above number or 
  search look down matrix(:,2) and return the row where (xxx,2) is less than (matrix(rows,2)-5000)</p>
  
  <p>even if it returns a new vector  of all rows where coloum2 is less than   (matrix(rows,2)-5000) then we can just get the size of that vecor to see what the last row is which meets our criteria </p>
  
  <p>in plain english  look down here and return the row where ans &lt; for example 53997364 ie the return would be 4 </p>
  
  <pre><code>53984704
  53991775
  53992283
  53992283
  53997367
  53997367
  53997367
  53997367
  53997401
  53997401
  </code></pre>