Solving two systems of DEs using the ode45 function.
显示 更早的评论
I am trying to solve two systems of differential equations in variables x1, x2, x3 using the ode45 function. The equations are given below:
dx1=-2*lambda*beta*x1+2*lambda*alpha*x2+lambda^2*sigma^2;
dx2=beta*x1-(alpha+lambda*beta)*x2+lambda*alpha*x3;
dx3=2*beta*x2-2*alpha*x3;
where alpha=alpha0+alpha1*t and beta=beta0+beta1*t and alpha0, alpha1, beta0, beta1, sigma, lambda are known constants.
The values I am trying to find are X1, X2 and X3. The derivatives of these desired values are given by:
dX1=beta*x1;
dX2=alpha*x2;
dX3=x3;
I am having difficulties implementing the above using the ode45 function given that the problem is defined by two sets of simultaneous differential equations. Any suggestions as to how this can be solved would be much appreciated. Thanks.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!