【发布时间】:2016-06-23 03:02:04
【问题描述】:
时间相关哈密顿量的薛定谔方程为:
我尝试为ode45 中的时间相关哈密顿量实现薛定谔方程的求解器。但是,因为哈密顿量 $H(t)$ 取决于时间。我不知道如何在ode45 中进行插值。能给我一些提示吗?
psi0 = [0 1];
H = [1 0;0 1]*cos(t); %this is wrong, I do not know how to implement this and pass it to ode45
hbar = 1;
t = [0:1:100];
[T, psi] = ode45(dpsi, t, psi);
function dpsi = f(t, psi, H, psi0)
dpsi = (1/i)*H*psi;
我也尝试想出一个矩阵插值的解决方案 MATLAB: Interpolation that involve a matrix.
【问题讨论】: