way to resize a matrix?



Hello, group!

What's the canonical way to resize a matrix?

Here's my dirty solution:

resize_matrix(m,rows,cols):=block([list: flatten(m), a],
  a[i,j]:= list[j+(i-1)*rows],
  genmatrix(a,rows,cols));


--
Andrei Zorine