Fast Ising in Matlab

Ising models are widely used in physics and mathematics. I was interested in doing some simple tests, however I was amazed that an Internet search turned up almost no available programs in Matlab.I was interested in doing some tests on simulated annealing and Ising models. Although these methods are widely documented, I was amazed that an Internet search turned up very few available programs in Matlab, and those few which were available were very crude and inefficient.

The following code is very fast, but is FAR easier to try out and modify than C/Java code. Comments and feedback are welcome. Download these, save into a directory, and then call from Matlab. The first link, below, contains a short demo which will illustrate how things work. You will need Matlab 5 or later.

A short demo program illustrating how the code works txt file

Fast 1D Ising for Matlab txt file

Fast 2D Ising for Matlab txt file

Fast 3D Ising for Matlab txt file