Homework #13

All problems MUST be in a SINGLE *.m file and be in separate blocks using '%% Problem X'. Otherwise you will not receive credit. You may need additional files for class definitions or functions. See class webpage for naming convention.

Contents

Problem 1

Take our 2D Ising model simulator and make a class. The class should have propoerties of 'B','J','Beta','UpdateInterval' and 'NumJumps'. The class should have methods to run the Markov Chain and to show the 2D image. Demonstrate these capabilities.

Problem 2

Add to the class a method that finds the correlation length. This can be done by radially averaging the 2D auto-correlation image and fitting the result to an exponential model. Least-squares fitting is sufficient for this purpose.

Problem 4

Run the simulation until it approaches equilibrium for values of 'J' between -2 and 0. Keep 'Beta' at one and 'B' at zero. Plot the correlation length as a function of 1/(Beta*J). Indicate with a dashed vertical line the location of the theoretically predicted phase transition. Use the 'publish' capability to make a PDF showing the use of your class and the figure produced.

Extra Credit

Make a GUI for the simulator.