Added create_matrix() function to easily create matrices.