Filling the matrix with data