title: Undefined function 'time' for input arguments of type 'double'. How do i find a function that others didn't seem to have defined in their code?
body: <p>I was calling the <strong>mpretrack</strong> function written by <a href="http://people.umass.edu/kilfoil/downloads.html" rel="nofollow">Kilfoil's Lab</a>, and it crashed, saying:</p>
  
  <pre><code>Undefined function 'time' for input arguments of type 'double'.
  Error in mpretrack (line 112)
  </code></pre>
  
  <p>I opened <code>mpretrack.m</code> and went to line 112: </p>
  
  <pre><code>MT(d+1:a+d, 7)=time(x);
  </code></pre>
  
  <p>How could I find the definition of <code>time</code>? They didn't seem to give a <code>time.m</code> file and I don't think they were trying to use the Matlab function <code>time()</code> which measures CPU time.</p>
  
  <p>I will paste a few more context lines of <code>mpretrack.m</code> of line 112</p>
  
  <pre><code>a = length(M(:,1));
  
  MT(d+1:a+d, 1:5)=M(1:a,1:5);
  MT(d+1:a+d, 6)=x;
  MT(d+1:a+d, 7)=time(x);
  d = length(MT(:,1));
  disp([num2str(a) ' features kept.'])
  </code></pre>