rowgrad(M) Returns the row gradient (difference by rows) of matrix M.
colgrad(M) Returns the column gradient (difference by columns) of matrix M.