TickEvent for matlab integration