2d matrices with nearest hoppings (square lattice)
조회 수: 4 (최근 30일)
이전 댓글 표시
2d matrices
댓글 수: 0
채택된 답변
Aman Banthia
2023년 10월 27일
Hi Zahid,
I understand you are trying to simulate Anderson Localization in a 2D square lattice with open boundary conditions. You have introduced disorder by assigning random onsite energies from a Gaussian distribution.
Your code seems correct for generating a 2D square lattice with open boundary conditions and onsite disorder. Here are some points to note:
1. Random Values: You're generating random values from a Gaussian distribution with mean 0 and standard deviation `W` for the onsite energies. This is a common choice for the Anderson localization problem. The `normrnd` function is the correct function to use for this.
2. Hamiltonian Matrix: You're correctly setting up a Hamiltonian matrix for a 2D square lattice with open boundary conditions. The diagonal elements represent the onsite energies (with disorder), and the off-diagonal elements represent the hopping terms.
3. Density of States Calculation: You're calculating the density of states (DOS) by histogramming the eigenvalues of the Hamiltonian. This is a common way to estimate the DOS.
4. Normalization: You're normalizing the DOS by the bin width and the total number of sites. This is the correct way to normalize the DOS.
So, your code seems correct based on your description of the problem.
However, if you're not getting the expected results, you might want to check the following:
1. Disorder Strength: The `W` parameter controls the strength of the disorder. You might want to experiment with different values of `W` to see how it affects the results.
2. Histogram Bins: The number of bins in your histogram can affect the appearance of your DOS plot. You might want to try increasing the number of bins to see if it gives you a smoother DOS.
3. Eigenvalue Calculation: Calculating the eigenvalues of a large matrix can be computationally expensive and might introduce numerical errors. You might want to check if this is causing issues in your case.
Remember that the Anderson localization problem is a complex problem that can show different behaviors depending on the parameters and the dimensionality of the system. So, it might take some experimentation to get the results you expect.
Hope the above solution helps you.
Best Regards,
Aman Banthia
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!