Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #4213

Re: Intermediate variables in user functions

From Ethan Merritt <eamerritt@gmail.com>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Intermediate variables in user functions
Date 2019-08-25 17:46 +0000
Organization A noiseless patient Spider
Message-ID <qjuhhd$bmn$1@dont-email.me> (permalink)
References <ab86c7c7-54d1-434d-bcbd-a60d33e0d13c@googlegroups.com>

Show all headers | View raw


On Sun, 25 Aug 2019 06:33:35 -0700, layzarc wrote:

> I have a script that works beautifully that has the following function definitions:
> 
> phi(x,y) = (1+x)/(1+sqrt(1+(x*x-1)*y))
> astig(n,x,y) = phi(x,y)*(1-phi(x,y)*y)*(n-1)**2-(phi(x,y)-n*n)*(n-1+y*(phi(x,y)-n))**2
> 
> It would be a lot cleaner if the following was possible:
> 
> phi(x,y) = (1+x)/(1+sqrt(1+(x*x-1)*y))
> astig(n,x,y) = f=phi(x,y) f*(1-f*y)*(n-1)**2-(f-n*n)*(n-1+y*(f-n))**2
> 
> Al

Use the serial evaluation operator (a,b):

    astig(n,x,y) = (f=phi(x,y) , f*(1-f*y)*(n-1)**2-(f-n*n)*(n-1+y*(f-n))**2)

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Intermediate variables in user functions layzarc@aol.com - 2019-08-25 06:33 -0700
  Re: Intermediate variables in user functions Ethan Merritt <eamerritt@gmail.com> - 2019-08-25 17:46 +0000
    Re: Intermediate variables in user functions layzarc@aol.com - 2019-08-25 12:21 -0700

csiph-web