SHIF Function
Standard Library function that shifts an array along one of its dimensions.
Usage
result = SHIF(array, dimension, shift_amount)
Input Parameters
array—An array.
dimensionAn integer (0) designating the shift dimension.
shift_amountAn integer specifying the shift amount.
Returned Value
result—An array of the same dimensions as array. The result is obtained from the input array by a shift of shift_amount elements along dimension dimension. The shift is not cyclic; elements behind the shift are unaltered.
Keywords
y—If set, the shift is cyclic.
Examples
PRINT, SHIF( [0,1,2,3,4,5], 0, 1 )
PRINT, ""
PRINT, SHIF( [0,1,2,3,4,5], 0, -2 )
PRINT, ""
PRINT, SHIF( [0,1,2,3,4,5], 0, -2, /y )
PRINT, ""
PRINT, SHIF( [[0,1,2],[3,4,5],[6,7,8]], 0, 1 )
PRINT, ""
PRINT, SHIF( [[0,1,2],[3,4,5],[6,7,8]], 1, 1 )
See Also