fixed error in hsmm_sim.m and hsmm.m