shift

Shift the vector elements or the matrix rows and the columns circularly.

Arguments

  1. Vector or matrix
  2. Number of shifting positions, integer value.
  3. String 'row' or 'col', 'row' for rows shift and 'col' for columns shift.

Output

Vector or matrix

Examples

shift