Date: Jun 6, 2014 1:03 PM
Author: Bruno Luong
Subject: Re: Finding position in array

> 
> Yet another approach somewhat akin to Bruno's...
>

> >> interp1(a,1:length(a),x,'nearest')
> ans =
> 3


Not completely equivalent, INTERP1 will has the resulting index jumps by 1 unit when passing the middle point of the EDGES, whereas HISTC jumps right at the EDGES.

INTERP1 and HISTC methods can deal with x as vector (not FIND()).