A Matlab implementation of the Kac Ring (Kac M. 1956. Some remarks on the use of probability in classical statistical mechanics. Académie Royale de Belgique, Bulletin de la Classe de Sciences, 5(42):356-361).
For the MATLAB app please see here: https://it.mathworks.com/matlabcentral/fileexchange/68331-kacring/