### 5.38.38 Make a matrix with a list : list2mat

list2mat takes as argument a list l and an integer p.
list2mat returns a matrix having p columns by cutting the list l in rows of length p. The matrix is filled with 0s if the size of l is not a multiple of p.
Input :

list2mat([5,8,1,9,5,6],2)

Output :

[[5,8],[1,9],[5,6]]

Input :

list2mat([5,8,1,9],3)

Output :

[[5,8,1],[9,0,0]]

Remark
Xcas displays matrix with [ and ] and lists with [ and ] as delimiters (the vertical bar of the brackets are thicker for matrices).