jacobiAlgorithm Matlab code with C++ extension for paper "Fast jacobi type algorithms for computing distances between linear dynamical systems"