       • To: mathgroup at smc.vnet.net
• Subject: [mg17105] Re: [mg17068] List of function-heads
• From: "Mark E. Harder" <harderm at ucs.orst.edu>
• Date: Sat, 17 Apr 1999 03:35:04 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```Peter;
The following seems to work.  The second statement uses SetDelay to
define the list of functions (a transformation from R^2 to R^1) that are
represented by the symbol f, so the functions in f, (a[x_],a[x_]), do
not overwrite f. Then whenever x is assigned a value, f can be evaluated.
The last statement verifies that the value of x can be changed, but the
definition of the transformation remains {x^2,x-1}. One difference between
and the single-statement function definition is that x is NOT a dummy
variable, i.e. the values given to the transformation must be called "x" in
order to work.  O.K?
In:=       fl=Table[a[i][x_],{i,2} ]
Out=    {a[x_],a[x_]}

In:=        x=2; fl
Out=    {4,1}

In:=        x=3;    fl
Out=    {9,2}

mark e. harder
harderm at ucs.orst.edu

-----Original Message-----
From: Peter Breitfeld <phbrf at t-online.de>
To: mathgroup at smc.vnet.net
Subject: [mg17105] [mg17068] List of function-heads

>I want to create a List of function-heads like this:
>{a[x_],a[x_],...,a[n][x_]}
>(to keep this message short I'll use n=2 in the following) to assign
>these to a list of Functions, e.g
>
>{a[x_],a[x_]}={x^2,x-1}
>
>I can do that with the following command:
>
>In:=fl=Table[a[i][x_],{i,2}]
>Out={{a[x_],a[x_]}
>
>But then I can't write:
>
>ll={x^2,x-1}
>
>because now the a[i] are overwritten and not assosiated with the
>elements of the rhs.
>
>Is there a way to get it working? I tried Thread, MapThread and some
>more but didn't find a solution.
>
>TIA
>
>Es gruesst  Peter
>--
>=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=
>  Peter Breitfeld, Saulgau, Germany        PGP public key:  08548045
>

```

• Prev by Date: Re msg16940 Simplifying expressions
• Next by Date: RE: Re: Together, Apart, ?