2015-06-08 58 views
1

如何在楓樹中繪製分段參數函數?在楓樹中繪製分段參數函數

一個例子:

F:= PROC(t)的當t = < 1.2和0 = <然後噸-t,2 * T的elif噸< = 0.4然後8 * T-1.8 ,2 * t elif t < = 0.6然後3 * t + .2,-2 * t + 1.6 elif t < = .8然後2 * t + .8,-t + 1 elif t < = 1 then -12 * t +12,-t + 1 end if end proc;

回答

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]);