Update detectpeakxcorr.m