Grace also contains a utility library matrix_util.pl which provides a number of useful predicates to manipulate variable lists and matrices. The library is automatically included when Grace is loaded, but it can also be used separately e.g. by calling
:- lib('grace/matrix_util')