DADiSP Worksheet Functions > Function Categories > Data Manipulation and Editing > SETXOFFSET
Specifies the x-offset of a series.
SETXOFFSET(series, xoffset)
series |
- |
Optional. A series or table, defaults to the current Window. |
xoffset |
- |
A real, the desired starting X value of the series. |
setxoffset(W1, -10.0)
sets the offset of the series in W1 to -10.0.
To set the offset of W1 to the offset of W2:
setxoffset(W1, xoffset(W2))
Many series have X values that are monotonically rising by a constant X increment such that:
A series with X values of this form is referred to as an interval series. Because any X value from an interval series can be computed with:
an interval series requires only the DELTAX and XOFFSET values to determine the X values. Thus, for an interval series, explicit X values are not necessary, decreasing the data storage requirements by a factor of 2. Also, because the X values for an interval series are regularly monotonic, speed optimizations for plotting and computations are available.
See XY to create a series with irregularly spaced X values.
Functions such as AUTOCOR, CROSSCOR and AMPDIST display the correct X axis values.
EXTRACT also sets the offset. For example, to extract 128 points at index 100 and set a zero x offset, use:
extract(W1, 100, 128, 0.0);
The Import Utilities recognize the optional header keyword X_OFFSET, so you can specify the offset when importing data files.