Standard Library functionthat reverses a vector or array for a given dimension.
NOTE: Running REVERSE is equivalent to running the ROTATE function with the correct parameter.
a = INDGEN(4, 3)
PRINT, a
0 1 2 3
4 5 6 7
8 9 10 11
PRINT, REVERSE(a)
3 2 1 0
7 6 5 4
11 10 9 8
a
.
PRINT, REVERSE(a, 2)
8 9 10 11
4 5 6 7
0 1 2 3
a
.
PRINT, REVERSE(REVERSE(a), 2)
11 10 9 8
7 6 5 4
3 2 1 0
a
.
scientist3.dat
file, and then rotate and redisplay it:
image1 = BYTARR(250, 200) OPENR, 1, !Data_dir + 'scientist3.dat' READU, 1, image1 TV, image1, 0 TV, REVERSE(image1), 1