在枫树中绘制分段参数函数

时间:2015-06-08 13:59:32

标签: maple

如何在枫树中绘制分段参数函数?

一个例子:

  

f:= proc(t)如果t&lt; = .2且0 <= t则-t,2 * t elif t <= .4则8 * t-1.8,2 * t elif t&lt; ; = .6然后3 * t + .2,-2 * t + 1.6 elif t&lt; = .8然后2 * t + .8,-t + 1 elif t <= 1然后-12 * t + 12, - 如果结束过程,t + 1结束;

1 个答案:

答案 0 :(得分:0)

我找到了答案。 如果有人需要它:

> X := piecewise(`and`(t <= .2, t >= 0), -t, t <= .4, 8*t-1.8, t <= .6, 3*t+.2, t <= .8, 10*t-4, t <= 1, -20*t+20);
Y := piecewise(`and`(t <= .2, t >= 0), 2*t, t <= .4, 2*t, t <= .6, -2*t+1.6, t <= .8, 1-t, t <= 1, 1-t);
> plot([X(t), Y(t), t = 0 .. 1]);