Skip to main content

rightx

rightx (waveName)

The rightx function returns the X value corresponding to point N of the named 1D wave of length N.

Details

Note that the point numbers in a wave run from 0 to N-1 so there is no point with this X value. To get the X value of the last point in a wave (point N-1), use the following:

pnt2x(waveName,numpnts(waveName)-1)	// N = numpnts(waveName)

which is more accurate than:

rightx(waveName) - deltax(waveName)

The rightx function is not multidimensional aware. The equivalent information for any dimension can be calculated this way:

IndexN = DimSize(wave, dim)*DimDelta(wave, dim) + DimOffset(wave, dim)

Here IndexN is the value of the scaled dimension index corresponding to element N of the dimension dim in a wave named wave that has N elements in that dimension.

See Also

deltax, leftx, pnt2x, numpnts

For an explanation of waves and X scaling, see The Waveform Model of Data.

For multidimensional waves, see DimDelta, DimOffset, and DimSize.