Create cont_matrix