Tools related to the gillespie algorithm in MATLAB