You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
This example integrates computation into a physics lesson on the Ising model of a ferromagnet. Exercises are included at the end. Students learn how to implement the Metropolis algorithm, write modular programs, plot physical relationships, run for-loops in parallel, and develop machine learning algorithms to classify phases and to predict the temperature of a 2D configuration of spins.
Note on required products:
MATLAB is the only required product to run the live script, although some of the exercises use Statistics and Machine Learning Toolbox, Parallel Computing Toolbox, and Neural Network Toolbox.
Cite As
MathWorks Physics Team (2026). Ising Model and Metropolis Algorithm (https://au.mathworks.com/matlabcentral/fileexchange/62194-ising-model-and-metropolis-algorithm), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.2.0.0 (4.74 MB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
