dsearch - dichotomic (binary) search

Calling Sequence

[ind, occ, info] = dsearch(X, val [, ch ])

Parameters

Description

  • case ch="c"

    this is the interval case, for each X(i) search in which of the n-1 intervals it falls, the intervals being defined by :

                I1 = [val(1), val(2)]
                Ik = (val(k), val(k+1)] for 1 < k <= n-1 ;
             

  • case ch="d"

    this is the discrete case, for each X(i) search if it is equal to one val(k)

  • Examples

    See Also

    Author