powered by
flipdim(a, dim) flipud(a) fliplr(a) circshift(a, sz)
flipdim
dim
dim=1
dim=2
flipud and fliplr are simply shortcuts for flipdim(a, 1) resp. flipdim(a, 2).
flipud
fliplr
flipdim(a, 1)
flipdim(a, 2)
circshift(a, sz) circulates each dimension (should be applicable to arrays).
circshift(a, sz)
a <- matrix(1:12, nrow=3, ncol=4, byrow=TRUE) flipud(a) fliplr(a) circshift(a, c(1, -1)) v <- 1:10 circshift(v, 5)
Run the code above in your browser using DataLab