MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: F[f_,x_]:=f[x] ?


Patrick McLean wrote:

> What is the name of the in-built Mathematica function that plays the role
> of F in te following:
>
> F[f_,x_]:=f[x].
>
> For example,
>
> Outer[F,{f,g},{x,y}]
>
> will give:
>
> {{f[x],f[y]},{g[x],g[y]}}.

Although f at x is the prefix form of f[x] you cannot use it here. Two ideas:

[1] Use a pure function instead of F:

Outer[#1[#2] & , {f, g}, {x, y}]

[2] Use Thread and Through:

Thread /@ Through[{f, g}[{x, y}]]

Cheers,
    Paul

____________________________________________________________________
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia
Nedlands WA  6907                     mailto:paul at physics.uwa.edu.au
AUSTRALIA                            http://physics.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________




  • Prev by Date: Does Mathematica work reliably in an Overclocked system
  • Next by Date: Bode-Diagrams
  • Previous by thread: Re: F[f_,x_]:=f[x] ?
  • Next by thread: Re: F[f_,x_]:=f[x] ?