find_closest_sorted: Return the index of a closest
no vote
%FIND_CLOSEST_SORTED Return the index of a closest value in a sorted matrix. % % DESCRIPTION: % find_closest returns the index of last item x in ascendingly % (descendingly) sorted matrix with respect to linear indexing that % satisfies condition x < value (x > value) using binary search. If there % is more than one element with the closest value, the index of the first % one is returned. If given matrix is empty value 0 is returned. % USAGE: % index = find_closest(vector, value) % % INPUTS: % vector - matrix to search % value - value to find % % OUTPUTS: % index - the index of a closest match o