Update calcDelay2dS.m