Markov Modulated Poisson Process code translated from Matlab to Julia