Adding possible to get visit order to the matlab code.