prev

Syntax

prev(X)

Arguments

X is a vector.

Details

Shift the elements of a vector to the right for one position. In comparison, next shifts the elements of a vector to the left for one position; move shifts the elements of a vector for multiple positions.

Examples

$ x=3 9 5 1 4;
$ prev(x);
[,3,9,5,1]