我是枫树的初学者,我不知道如何绘制像这样的ODE系统。
这是代码
g := 9.81;
m := 0.25e-2;
h := 0.73e-3;
xi := -.5;
yi := -.5;
zi := .3;
vxi := 8;
vyi := 2;
vzi := 3;
wx := (0*2)*Pi;
wy := (13*2)*Pi;
wz := (0*2)*Pi;
eqx := m*(diff(x(t), t, t)) = -h*sqrt((diff(x(t), t))^2+(diff(y(t), t))^2+ (diff(z(t), t))^2)*(diff(x(t), t))+a*(wy*(diff(z(t), t))-wz*(diff(y(t), t)));
eqy := m*(diff(y(t), t, t)) = -h*sqrt((diff(x(t), t))^2+(diff(y(t), t))^2+(diff(z(t), t))^2)*(diff(y(t), t))+a*(wz*(diff(x(t), t))-wx*(diff(z(t), t)));
eqz := m*(diff(z(t), t, t)) = -m*g-h*sqrt((diff(x(t), t))^2+(diff(y(t), t))^2+(diff(z(t), t))^2)*(diff(z(t), t))+a*(wx*(diff(y*t, t))-wy*(diff(x(t), t)));
ei := x(0) = xi, y(0) = yi, z(0) = zi, (D(x))(0) = vxi, (D(y))(0) = vyi, (D(z))(0) = vzi;
F := dsolve({ei, eqx, eqy, eqz}, {x(t), y(t), z(t)}, numeric, output = listprocedure);
提前致谢。
答案 0 :(得分:0)
命令是
plots:-odeplot(F, [x,y,z](t), 0..100);