我正在尝试使用dsolve
命令在 Matlab 上求解一组微分方程。我有如下定义的三个方程,但不是数值系数,而是我有通用参数,如lambda1
、lambda2
等,我想根据这些参数获得结果。代码如下:
syms p0(s) p1(s) p2(s) lambda1 lambda2 mu1 mu2;
eqn1=diff(p0)-1==-lambda1*p0-lambda2*p0+mu1*lambda2*p0/(s+mu2)+mu2*lambda1*p0/(s+mu1);
eqn2=s*p1==lambda1*p0-mu2*p1;
eqn3=s*p2==lambda2*p0(s) - mu1*p2(s);
S = dsolve(eqn1, eqn2, eqn3)
我收到以下错误:
Cannot reduce to the square system because the number of equations
differs from the number of indeterminates.
我相信它必须与参数有关。我应该怎么办?