I test the impactEventCallback function with different parameters updating raw, nevertheless the simulation results do not change. I suspect that the impactEventCallback function does not be called although I have setted odeEvent object with following :
E = odeEvent("EventFcn",@(t,Y,P) impactEvent(t,Y,P),"Direction","ascending","CallbackFcn",@(te,Ye,ie,P) impactEventCallback(te,Ye,ie,P),"Response","proceed");