SETDELTAX

Purpose:

Modifies the spacing between points on the horizontal axis.

Syntax:

SETDELTAX(series, dx, col)

series

-

Optional. A series or table, defaults to the current Window.

dx

-

A real, the new delta X value.

col

-

Optional. An integer, the column number. Defaults to -1 for all columns.

Example:

setdeltax(0.2)

 

sets the current DELTAX to 0.2, i.e. 2 seconds per sample or a sample rate of 5 samples per second if the horizontal units are seconds.

Example:

a = 1..100;

setdeltax(a, 3);

 

sets the DELTAX of variable a to 3, i.e. 3 seconds per sample or a sample rate of 1/3 samples per second if the horizontal units are seconds.

Example:

W1: randn(100, 3);setdeltax(1/10, 2)

W2: col(w1, 1)

W3: col(w1, 2)

W4: col(w1, 3)

 

W1 contains a 10x3 random array with a default deltax of 1.0. The deltax of the second column is explicitly set to 1/10 seconds per sample.

 

W2 contains column 1 of W1 where deltax(w2) == 1.

 

W3 contains column 2 of W1 where deltax(w3) == 0.1.

 

W4 contains column 3 of W1 where deltax(w3) == 1.

Remarks:

By default, SETDELTAX changes the deltax of each column of data to the new deltax. For example,

 

ravel({1, 3, 5}, grandom(3, 0.1)); setdeltax(0.5)

 

sets the current deltax of the generated series in column 1 as well as the generated random series in column 2 to 0.5.

 

The DELTAX of a series is the inverse of the RATE:

 

image\dxfs.gif

 

Many series have X values that are monotonically rising by a constant X increment such that:

 

image\xy01.gif

 

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:

 

image\XY02.gif

 

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 SETRATE to set the sample rate of a series.

 

See XY to create a series with irregularly spaced X values.

See Also:

DELTAX

DELTAY

RATE

SETDELTAY

SETHUNITS

SETRATE

SETXOFFSET

SETYOFFSET

XOFFSET

XY

YOFFSET