• translate(M, rows, cols, pad)—Returns a matrix the same size as M, with the original elements translated by rows rows and cols columns, padding unfilled matrix elements with pad.
Arguments
• M is an image matrix.
• rows, cols are integers, where the sign indicates the direction of the shift.
• pad is a real number between 0 and 255, inclusive.