
/* Assorted matrix functions written for ELIZC by JPG */
/* Examples: Let M be a 4x4 matrix.
ROWS(M,[1,3]); gives MATRIX([M11,M12,M13,M14],[M31,M32,M33,M34]).
COLS(M,[1,3]); gives MATRIX([M11,M13],[M21,M23],[M31,M33],[M41,M43]). */

rows(m,r):=apply('matrix,makelist(m[i],i,r))$
cols(m,c):=transpose(rows(transpose(m),c))$
