我正在尝试在matlab中解决这组方程
syms x(t) y(t) z(t) g m h p wz wx wy
Dx=diff(x)
Dy=diff(y)
Dz=diff(z)
D2x=diff(x,2)
D2y=diff(y,2)
D2z=diff(z,2)
eq1=diff(x,2)==(-h*sqrt(diff(x).^2+diff(y).^2+diff(z).^2)*diff(x)+p* (wy.*diff(z)-wz*diff(y)))/m
eq2=diff(y,2)==(-h*sqrt(diff(x).^2+diff(y).^2+diff(z).^2)*diff(y)+p*(wz.*diff(x)-wx*diff(z)))/m
eq3=diff(z,2)==(-m*g-h*sqrt(diff(x).^2+diff(y).^2+diff(z).^2)*diff(z)+p*(wx.*diff(y)-wy*diff(x)))/m
g=9.81
m=2.5*10^-3
h=7.3*10^-4
p=1.8^-5
wz=-20*2*pi
wx=0.2*pi
wy=-20*2*pi
c1=x(0)==-0.5
c2=y(0)==-0.5
c3=z(0)==0.3
c4=Dx(0)==8
c5=Dy(0)==2
c6=Dz(0)==3
S=dsolve(eq1, eq2, eq3,c1,c2,c3,c4,c5,c6,t)
xSol(t)=S*x
ySol(t)=S*y
zSol(t)=S*z
但我得到了这个
Warning: Explicit solution could not be found.
> In dsolve (line 201)
In Trajectoire (line 31)
S =
[ empty sym ]
我在论坛上搜索了一个解决方案但没有任何帮助。 你能帮我找出问题所在吗?
这是我与ode45的试用
g=9.81
m=2.5*10^-3
h=7.3*10^-4
p=1.8^-5
wz=-20*2*pi
wx=0.2*pi
wy=-20*2*pi
syms x(t) y(t) z(t)
V=odeToVectorField(diff(x,2)==(- h*sqrt(diff(x).^2+diff(y).^2+diff(z).^2)*diff(x)+p*(wy.*diff(z)-wz*diff(y)))/m, diff(y,2)==(-h*sqrt(diff(x).^2+diff(y).^2+diff(z).^2)*diff(y)+p*(wz.*diff(x)-wx*diff(z)))/m,diff(z,2)==(-m*g- h*sqrt(diff(x).^2+diff(y).^2+diff(z).^2)*diff(z)+p*(wx.*diff(y)-wy*diff(x)))/m)
M = matlabFunction(V,'vars', {'t','Y'})
[t,x,y,z]=ode45(M,[0 100],[8 2 3])