.. highlightlang:: us .. _xyfind: XYFind ====== .. index:: XYFind .. us.tag XYFind ENGLISH xy.data :ref:`XYFind` finds in a 1D or 2D dataset a datapoint for a given x-coordinate. .. function:: rvInfo = XYFind(hData, rsX, bInterpol) .. us.return **Return Value** *rvInfo* is a vector with 3 elements or 0 if no point was found. .. list-table:: :header-rows: 1 * - Value - Meaning * - rvInfo[1] - Index of the found data point, starting with 1 * - rvInfo[2] - x-coordinate of the found data point * - rvInfo[3] - y-coordinate of the found data point .. us.params **Parameters** .. uparam:: hData The handle of a dataset created with :ref:`XYCreate` or :ref:`TYCreate`. .. uparam:: rsX *rsX* x-coordinate of the data point. .. uparam:: bInterpol If *bInterpol* is TRUE (1), the function returns for the given x-coordinate a linear interpolated y-coordinate and the index of the data point which is closest to the given x-coordinate. If *bInterpol* is FALSE (0) (default value), the function returns an x-/y-coordinate and the index of the data point which is closest to the given x-coordinate. .. us.comment **Comment** The x data of the dataset must be of monotone increasing or decreasing order. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.6.4 - *rvInfo* fixed. .. seealso:: :ref:`overview-xy-datasets`, :ref:`XYCreate` :sub:`id-1097999`