Insert rows or columns into matrix
