ScaleToIndex
ScaleToIndex (waveName, coordValue, dim)
The ScaleToIndex function returns the number of the element in the requested dimension whose scaled index value is closest to coordValue .
The ScaleToIndex function was added in Igor Pro 7.00.
Parameters
dim is a dimension number: 0 for rows, 1 for columns, 2 for layers, 3 for chunks.
coordValue is a scaled index in that dimension.
Details
The ScaleToIndex function returns the value of the expression:
round((coordValue - DimOffset(wave,dim)) / DimDelta(wave,dim))
With dim=0, ScaleToIndex is equivalent to x2pnt.
If coordValue is NaN or +/-INF, ScaleToIndex returns NaN. Otherwise, the result is computed based on the DimOffset and DimDelta of the specified dimension of the wave. The result is not clipped to a valid element number for the wave dimension.
See Also
IndexToScale, x2pnt, DimDelta, DimOffset
The Waveform Model of Data for an explanation of wave scaling.