about generate matrix and vector