use ind2sub
MC simulation for joint MDP