使用ode45求解微分方程组时的一个小问题
Show older comments
我需要求解如下的微分方程组:

现在需要求解这个微分方程组的数值解,我知道的解微分方程的函数只有ode45那个系列的,前三个式子已经写好,最后一个式子在程序中不知道应该怎么写,因为它是个二阶导,写的时候得先降成一阶,但它变量里除了Omegac还有a(1)和a(2)。求问各位大佬,这个应该怎么写呀,或者是要用其它求解微分方程组的函数?还有什么函数能用呀?
function da = ProbabilityAmplitude(t,a)
Omegac0 = 8e7;
DeltaP = 0.5*Omegac0;
DeltaC = 0.5*Omegac0;
lambda = -0.5*Omegac0/(10+1);
epsilon0 = 8.85e-12;
h = 6.626e-34;
h_bar = h/(2*pi);
N = 1e20;
xi12 = 1e-29;
load dat n;
da = zeros(3,1);
da(1) = 0.5*1i*conj(Omegac).*a(2);
da(2) = -1i*DeltaC*a(2)+0.5*1i*Omegac*a(1)-1i*lambda*sqrt(n+1)*a(3);
da(3) = -1i*(DeltaC+DeltaP)*a(3)-1i*lambda*sqrt(n+1)*a(2);
另外,求问各位大佬,最后一个方程能不能先进行两次积分,得到ct+b的形式?但这里这里c和b是完全不确定的量,那编程的时候只要随便赋一个值就可以了么?
Answers (0)
Categories
Find more on 常微分方程 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!