Fixed a bug related to noiseRepsRatio==0 in genPhaseScript.m