reverse
Syntax
reverse(X)
Arguments
X is a vector/matrix.
Details
Return a new vector or matrix with reverse order of the original vector or matrix.
Examples
reverse `hello `world;
// output
[world,hello]
(1..6).reverse();
// output
[6,5,4,3,2,1]
x=1..6$2:3;
x
#0 | #1 | #2 |
---|---|---|
1 | 3 | 5 |
2 | 4 | 6 |
reverse(x);
#0 | #1 | #2 |
---|---|---|
6 | 4 | 2 |
5 | 3 | 1 |