DADiSP Worksheet Functions > Function Categories > Data Manipulation and Editing > REVERSE

 

REVERSE

Purpose:

Reverses the values of a series.

Syntax:

REVERSE(series, offset)

series

-

A series or table.

offset

-

Optional. A real, the X offset of the resulting series.

Returns:

A series or table.

Example:

reverse({1, 2, 3})

 

returns a series {3, 2, 1}. The XOFFSET of the series is –2.0.

Example:

The reverse of a 10-point line with equation y = 2x + 1,

 

reverse(gline(10,0.1,2,1))

 

creates a 10-point series (line) with equation y = -2x + 1.

Example:

reverse(gline(10,0.1,2,1), 0.0)

 

Same as above except the offset of the resulting series is set to 0.0. Thus, the equation of the line becomes y = -2x + 2.8.

Example:

conv(W2,rev(W2))/2*length(W2)

 

creates a new series, in the current Window, which is the auto-correlation of the series in Window 2. This formula will show the periodicity of the series.

Remarks:

If not specified, the XOFFSET of the result is -(length(series) - 1) * deltax(series).

 

REVERSE can be abbreviated REV.

See Also:

AUTOCOR

CONCAT

EXTRACT

FLIPLR

FLIPUD