schrod.m
来自「matlab6矩阵微分工具 matlab6矩阵微分工具」· M 代码 · 共 22 行
M
22 行
% The script file schrod.m computes the first eigenvalue of the Schrodinger % equation on the half-line using an NxN Laguerre differentiation matrix.% J.A.C. Weideman, S.C. Reddy 1998N = input(' Order of the differentiation matrix: N = ? ');b = input(' Scaling parameter of the Laguerre method: b = ? ');r = 5.08685476; epsi = 0.929852862; % Parameters for Woods-Saxon potential[x,D] = lagdif(N+1,2,b); % Compute Laguerre derivative matrix,D2 = D(2:N+1,2:N+1,2); % and enforce boundary conditions.x = x(2:N+1);Q = diag(1./(1+exp((x-r)/epsi))); % Woods-Saxon potentialI = eye(size(D2)); % Identity matrix e = min(eig(-D2+I,Q)) % Compute smallest eigenvalue
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?