|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
共求解16个偏微分方程组, 数值解已经得到, 但解析解出现问题.
syms n w g r
r=1e6;
g=r;
w=10*r;
n=0;
f1=(n+1).*g.*(1-exp(-r.*t))./2+n.*r.*g.*(1-exp(-r.*t+i*2.*w.*t))./(2.*(r-i.*2.*w));
f2=(n+1)*g*(1-exp(-r.*t))/2+n*r*g.*(1-exp(-r.*t-i*2*w.*t))./(2*(r+i*2*w));
f3=(n+1)*r*g.*(1-exp(-r.*t-i*2*w.*t))./(2*(r+i*2*w))+n*g*(1-exp(-r.*t))/2;
f4=(n+1)*r*g.*(1-exp(-r.*t+i*2*w.*t))./(2*(r-i*2*w))+n*g*(1-exp(-r.*t))/2;
A=dsolve('dy1=(-i*w-2*f1-2*f2-2*f3)*y1+f4*(y6+y7+y10+y11),
dy2=(-i*w-2*f1-f2-f3-f4)*y2-(f2+f3+f4)*y3+f4*(y8+y12),
dy3=(-i*w-2*f1-f2-f3-f4)*y3-(f2+f3+f4)*y2+f4*(y8+y12),
dy4=(-i*w-2*f1-2*f4)*y4,
dy5=-(f1+2*f2+2*f3)*y5-f1*y8+f4*(y14+y15),
dy6=(f1+f2+f3)*y1-(f2+f3+f4)*(y6+y7)-f1*(y6+y10)-f4*y16,
dy7=(f1+f2+f3)*y1-(f2+f3+f4)*(y6+y7)-f1*(y6+y11)-f4*y16,
dy8=(f1+f2+f3)*(y2+y3)-(f1+2*f4)*y8-f1*y12,
dy9=-f1*y5-(f1+2*f2+2*f3)*y9+f4*(y14+y15),
dy10=(f1+f2+f3)*y1-f1*y6-(f1+f2+f3+f4)*y10-(f2+f3+f4)*y11+f4*y16,
dy11=(f1+f2+f3)*y1-f1*y7-(f2+f3+f4)*y10-(f1+f2+f3+f4)*y11+f4*y16,
dy12=(f1+f2+f3)*(y2+y3)-f1*y8-(f1+2*f4)*y12,
dy13=(i*w-2*f2-2*f3)*y1',
dy14=(i*w-f2-f3-f4)*y14+(f1+f2+f3)*(y5+y9)-(f2+f3+f4)*y15,
dy15=(i*w-f2-f3-f4)*y15+(f1+f2+f3)*(y5+y9)-(f2+f3+f4)*y14,
dy16=(i*w-2*f4)*y16+(f1+f2+f3)*(y6+y7+y10+y11),
'y1(0)=1,y2(0)=0,y3(0)=0,y4(0)=0,y5(0)=0,y6(0)=0,y7(0)=0,y8(0)=0,y9(0)=0,y10(0)=0,y11(0)=0,y12(0)=0,y13(0)=0,y14(0)=0,y15(0)=0,y16(0)=0','t')
错误如下:
??? Error: File: diffequation.m Line: 10 Column: 10
A MATLAB string constant is not terminated properly.
新手一个, 请高手指点迷津, 万分感谢!!!!!!! |
|