Hi(adsbygoogle = window.adsbygoogle || []).push({});

I'm working on a matlab simulation of the 2D Ising model, and would like to verify my code and its results. One thing I'd like to try and observe is the transition from anti-ferromagnet to ferromagnet, but I'm not sure how to create the initial lattice in Matlab. I've already made a (pseudo)random lattice of spins and one that starts as a ferromagnet.

In other words, how can I create a lattice with alternating elements (1s and -1s)?

Also, is there a way to plot or graph my matrix as a colour/greyscale grid, so that -1s are black and +1s are black say? Currently I've used a surface plot but have to rotate the 3D image to a plan view.

**Physics Forums - The Fusion of Science and Community**

# Matlab Ising model: Anti-ferromagnet

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

Have something to add?

- Similar discussions for: Matlab Ising model: Anti-ferromagnet

Loading...

**Physics Forums - The Fusion of Science and Community**