Xindex

 

Contents

Description

The xindex function returns the index number of the cell in the X dataset associated with vd, where the cell value is closest to specified x.

Syntax

xindex(double x, vector vd, [, int option])

Parameters

x

is any real number.

vd

is the vector data.
Requirements:

option

Contains three options:

Note: The 3rd argument (option) has been available since Origin 8.0 SR3. left means earlier in the dataset (lower row number) and right means later in the dataset (higher row number).

Return

Returns the index number of the cell in the X dataset associated with vd, where the cell value is closest to x.

Examples

range rb = [Book1]Sheet1!col(B);
ix=xindex(4.5,rb);

See Also

LabTalk:Xof (function), LabTalk:Xindex1 (function), LabTalk:Xvalue (function), LabTalk:Idx_(function)