Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #194 Circular shift of a two-dimensional array

Given an array a, set b to an array which has the values of a along its second dimension shifted by n. Elements shifted out should come back at the other end.

b = cshift(a,n,dim=2)

New implementation...
< >
tkoenig