From: Jaime V. <vi...@fe...> - 2024-10-10 14:43:59
|
On 10/10/24 15:39, Jaime Villate wrote: > > > On 10/10/24 01:48, Robert Dodier wrote: >> On Wed, Oct 9, 2024 at 2:33 PM Eduardo Ochs<edu...@gm...> wrote: >> >>> P(t) := if t <= 6 then [t,4] else [6,10-t]; >>> draw2d(parametric(P(t)[1], P(t)[2], t,0,10)); >>> >>> ... >>> yields this error: >>> >>> draw2d (parametric): non defined variable >> As a workaround, one could say something like >> >> P1(t) := if t <= 6 then t else 6; >> P2(t) := if t <= 6 then 4 else 10 - t; >> draw2d (parametric (P1(t), P2(t), t, 0, 10)); > > Or you could also use instead: > > plot2d ([parametric, P1(t), P2(t), [t, 0, 10]]); > Sorry; that works the same as draw2d, but what I really meant was: plot2d ([parametric, P(t)[1], P(t)[2], [t, 0, 10]]); which does not give an error as draw2d does. Regards, Jaime |