Update getVelocities.m