matrix2.m
来自「求解量子力学的薛定谔方程」· M 代码 · 共 17 行
M
17 行
%> The program <matrix2.m> solves for approximate eigenvalues %> using the matrix diagonalization methods built into MATLAB.%> Hamiltonian = kinetic part + potential defined in [0,1],%> Boundary conditions: u(0) = u(1) = 0. The potential is chosen %> from a set defined in <pot1.m> using <choice.m>, and the %> strength of it is defined by a multiplier. The multiplier must %> be chosen large enough in order to get interesting effects. %> Recall the scale of the spectrum of a particle confined to %> [0,1] is E = (n*pi)^2/2, approx = 5, 20, 44, 79, 123, 178, ..%> The basis set are harmonic functions in [0,1] adapted to the BCs.%> The matrix elements of the kinetic energy are diagonal and exact, %> those of the potential are calculated using the FFT. Then the %> eigenvalues the resulting finite matrix are ound using the %> MATLAB <eig> algorithm and a few are displayed graphically.%> %>%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?