title: using Matlab, how to find the maximum value over a certain range?
body: <p>i want to know the coding to find the maximum value, over a certain range.
  i already coded like below.</p>
  
  <pre><code>f=f'
  ac_yyyy_f=ac_yyyy_f'
  [row,col] = ind2sub(size(ac_yyyy_f),find(ac_yyyy_f==max(ac_yyyy_f)))
  </code></pre>
  
  <p>but the problem is, sometimes the maximum value of Y axis choosen by my code is not what i want.
  the X axis has the range of 0 to 100000 and i want the maximum between 20000 to 100000. the problem is sometimes the max value show up at the range of 0 to 20000. 
  How can i figure this out?</p>