Split a matrix by rows, based on either the number of rows per group or number of splits.
Useful links