FindInterval

Half-interval search algorithm

Syntax

(i, error) = FindInterval(x, breaks)

Inputs (2)

x

Type: Real

Description: Input

breaks

Type: Real[:]

Description: Grid points defining the intervals

Outputs (2)

i

Type: Integer

Description: Found interval number

error

Default Value: 0

Type: Integer

Description: 1=did not find interval