|
From: Ethan M. <eam...@gm...> - 2024-04-21 21:29:53
|
On Sun, Apr 21, 2024 at 6:31 AM <fi...@ig...> wrote:
> Dear Gnuplot Users,
>
> suppose the following simple gnuplot example snippet which is used to
> plot a complex valued function:
>
> w = 5
> r = 3
> f(t) = r * exp(I * w * t)
> plot sample [t=0:1] '+' u (real(f(t))):(imag(f(t))) w l
>
> here the function f(t) is evaluated twice - not desirable because of
> performance. How can this be done with only one evaluation of f(t)?
>
plot sample [t=0:1] '+' u (temp=f(t),real(temp)):(imag(temp)) w l
>
> Thanks for any advice and best regards
>
> Torsten
>
|