The listmat command
turns a list into a matrix by chopping up the list into separate rows.
list2mat takes two arguments:
L, a list.
p, a postive integer.
list2mat(L,p) returns the matrix whose first row
consists of the first p elements of L, whose next row consists
of the next p elements of L, etc. If there are not enough
elements to fill up a row, zeros are added.