马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
> restart;
> pendphaseplot := proc (c, k, ui, uf, n1, vi, vf, n2, ti, tf, n, vu, vv) local s, i, a, j, b, sys, fcns, q, p; end proc;
> s := {};
>
> for i from 0 to n1 do;
> a := ui+i*(uf-ui)/n1;
> for j from 0 to n2 do;
> b := vi+j*(vf-vi)/n2;
> sys := diff(u(t), t) = v(t), diff(v(t), t) = -k*sin(u(t))-c*v(t);
> fcns := {u(t), v(t)};
> q := dsolve({sys, u(0) = a, v(0) = b}, fcns, type = numeric, method = rkf45);
> p := plots[odeplot](q, [u(t), v(t)], ti, tf, numpoints = n, view = [vu, vv], scaling = constrained);
> od:
> od:
> plots[display]([op(s)]);
> end:
> pendphaseplot(0, 2, -4, 4, 10, -3, 3, 6, -5, 5, 100, -10 .. 10, -5 .. 5);
以上是画单摆的相图的程序,总是出错,希望得到高人指教QQ:296620565 请注明:maple
[ 本帖最后由 无水1324 于 2008-10-25 11:59 编辑 ] |