Each matrix in Macaulay is presumed to be graded. i.e. each row and each column is given an integer degree, and the sum of the i th row degree with the degree of the (i,j) entry of the matrix is equal to the j th column degree.
When a matrix is created, its row degrees are all set to zero. The degree of each non-zero column is then computed, and every zero column is given degree zero.
The commands setdegs, setcoldegs, and dshift modify the row and column degrees of a matrix. This is sometimes necessary because certain commands do not usually reset the degrees of the matrix which they modify. These commands include the ``edit matrix'' commands (section 6.4), concat, and edit-map.
Most commands of Macaulay will operate on matrices which are not graded. The only commands which require graded matrices are the commands which compute standard (Groebner) bases. These commands include std, res, nres, syz, intersect, quotient, modulo, and lift-std.