求解微分方程的问题(动态马尔科夫过程)
dp/dt=E'*p;p'*1=1;p(0)=[001];E=[-0.010.010;0.04-0.0450.005;00.02-0.02];我用dsolve去求解,化为...
dp/dt=E'*p;
p'*1=1;
p(0)=[0 0 1];
E=[-0.01 0.01 0; 0.04 -0.045 0.005; 0 0.02 -0.02];
我用dsolve去求解,化为下列式子
[x y z]=dsolve('Dx=-0.01*x+0.04*y','Dy=0.01*x-0.045*y+0.02*z','Dz=0.005*y-0.02*z','x+y+z=1','x(0)=0','y(0)=0','z(0)=1')
Warning: The number of equations exceeds the number of indeterminates. Trying heuristics to reduce to square system.
[ode::solve_intern]
运行后就报错。。多谢了 展开
p'*1=1;
p(0)=[0 0 1];
E=[-0.01 0.01 0; 0.04 -0.045 0.005; 0 0.02 -0.02];
我用dsolve去求解,化为下列式子
[x y z]=dsolve('Dx=-0.01*x+0.04*y','Dy=0.01*x-0.045*y+0.02*z','Dz=0.005*y-0.02*z','x+y+z=1','x(0)=0','y(0)=0','z(0)=1')
Warning: The number of equations exceeds the number of indeterminates. Trying heuristics to reduce to square system.
[ode::solve_intern]
运行后就报错。。多谢了 展开
1个回答
展开全部
式子比未知数多伏宽,出现contradiction,当然会报错
x+y+z=1是多馀的缺空亮
动态矩阵有了,初始矢量有了,亏笑已经够了
x+y+z=1是多馀的缺空亮
动态矩阵有了,初始矢量有了,亏笑已经够了
追问
[x y z]=dsolve('Dx=-0.01*x+0.04*y','Dy=0.01*x-0.045*y+0.02*z','Dz=0.005*y-0.02*z','x(0)=0','y(0)=0','z(0)=1') 我换成这个后
求出的结果自动满足x+y+z=1.不知道什么原因
追答
虽然本身x+y+z=1不冲突其他条件
但是电脑应该是默认 等式数量大於未知数数量时,直接报错
如果三个未知数出现四个式子,第四个式子如果是随意的,基本都会冲突前三个,除非第四个式子能从前三个导出,也算是最基础的线代知识。。。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询