Mathematica绘制100个格点链的能谱
以下是使用Mathematica绘制100个格点链的能谱的示例代码:
(*定义哈密顿量*)
H[n_, t_] :=
Sum[If[i == j + 1 || i == j - 1, -t, 0], {i, 1, n}, {j, 1, n}];
(*计算能量本征值*)
energies = Eigenvalues[H[100, 1]];
(*绘制能谱图*)
ListPlot[energies, PlotRange -> All, AxesLabel -> {'Eigenvalue', 'Energy'},
PlotStyle -> PointSize[0.01], ImageSize -> Large]
运行该代码将生成一个包含100个格点链的能谱图像。
原文地址: https://www.cveoy.top/t/topic/nfnx 著作权归作者所有。请勿转载和采集!