Create kdsum_generator.m