dataGenerator for Matrix