Update generatePeak.m