title: how to get the maximum value in determined range of a line profile by DM script
body: <p>By the following DM script, I can get the maximum value of the line profile with whole range</p>
  <p>no sure to get the maximum value in the partial range?  for example, the whole range is 0 to 20, but I only want the maximum value between X coordinates from 6 to 8; how to reach this?</p>
  <p>any suggestions, thanks a lot!</p>
  <p>number x0,y0,x,y, halfMax, max, i, val, delta, deltaMin, xmin, xmax</p>
  <p>number d0, d1</p>
  <p>// find the maximum Y coordinate and half maximum coordinate</p>
  <p>image spc:=getFrontImage()</p>
  <p>string xUnit = spc.ImageGetDimensionUnitString(0)</p>
  <p>spc.getSize(d0,d1)</p>
  <p>max=spc.max(x0,y0)</p>
  <p>OKDialog(&quot;max is &quot; +max +&quot; &quot;+ xUnit)</p>