2 /* Assorted matrix functions written for ELIZC by JPG */
3 /* Examples: Let M be a 4x4 matrix.
4 ROWS(M,[1,3]); gives MATRIX([M11,M12,M13,M14],[M31,M32,M33,M34]).
5 COLS(M,[1,3]); gives MATRIX([M11,M13],[M21,M23],[M31,M33],[M41,M43]). */
7 rows(m,r):=apply('matrix,makelist(m[i],i,r))$
8 cols(m,c):=transpose(rows(transpose(m),c))$