Added matrix_gen.c file.