Update generator.m

New generator