Skip to main content
. 2013 Feb 11;4(3):397–411. doi: 10.1364/BOE.4.000397

Algorithm 1.

V = ValleyDet(g, δ)

V = ∅
Lmax = 0; umax = 1; umin = 1
for u = 2 : Nr
  if g(u) > g(umax), then umax = u end
  if g(u) < g(umin), then umin = u end
  if Lmax
    if g(u) < g(umax) −δ, then umin = u, Lmax = 0 end
  else
    if g(u) > g(umin) +δ, VuminV, umax = u, Lmax = 1 end
  end
end