フィルターのクリア

2d matrices with nearest hoppings (square lattice)

2 ビュー (過去 30 日間)
Zahid
Zahid 2023 年 9 月 8 日
編集済み: Zahid 2024 年 4 月 25 日
2d matrices

採用された回答

Aman Banthia
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 件)

カテゴリ

Help Center および File ExchangeSparse Matrices についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by