Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (2)
Two dimensional Ising model Monte Carlo matlab
no vote
Using Monte Carlo method and importance sampling method, that is to extract a state subset from the set of all States, to make the average of the states in the extracted subset as close as possible to the average of all States, so as to calculate the average value. The most basic is how to randomly select the initial value of spin S, and then skip the Monte Carlo sampling step for each spin variable on each lattice point in order to determine its next spin state. Here, the most basic and commonly used metropolis method is adopted. The steps are as follows: Step 1: randomly select the initial lattice configuration s = {S1, S2,..., Sn}; step 2: randomly select a lattice point I according to the equal probability of 1 / N, reverse the spin on it, and get a new configuration s' = {S1, S2,..., - Si,..., Sn}; step 3: calculate the energy difference △ e = e (s') - E (s), if △ e ≤ 0, the change is effective, take the spin change, the configuration change s → s'. This corresponds to the case of P (s') & gt; P (s) and w (s → s') = 1.
2022457140ynj
2018-05-20
0
1
Monte Carlo simulation of Ising model
no vote
Monte Carlo simulation of Ising model of two-dimensional number, for the sampling of general distribution, has been realized in many programming languages, such as the most basic random number satisfying uniform distribution, but for complex distribution, if you want to sample it, there is no good function. Here, you can use Markov chain Monte Carlo, Among them, metropolis Hastings sampling and Gibbs sampling are widely used in MCMC. The basic theory of MCMC is Markov process. In MCMC algorithm, in order to sample on a given distribution, according to the Markov process, the Markov process is simulated from any state first, then the state is transferred continuously, and finally converges to the stable distribution.
2022457140ynj
2018-05-11
0
1
No more~