MATLAB code
This code is written by Andreas Svensson and it is available from his web site.
Relevant paper
Andreas Svensson, Thomas B. Schön and Fredrik Lindsten. Identification of jump Markov linear models using particle filters. In Proceedings of the 53rd IEEE Conference on Decision and Control (CDC), Los Angeles, CA, USA, December, 2014. [pdf]