Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Evaluation Question

  • To: mathgroup at
  • Subject: [mg76499] Re: [mg76448] Evaluation Question
  • From: "Lev Bishop" <lev.bishop at>
  • Date: Wed, 23 May 2007 05:21:03 -0400 (EDT)
  • References: <>

On 5/22/07, hoffmannick <hoffmannick at> wrote:
> Can anyone help me solve the following problem?
> I have a function of 3 variables, let's say
> f[a_, b_, c_] = a + b + c
> Now I need to evaluate the function at some given points.  To evaluate
> at a single point I would do
> f[0,0,1]
> For the point (0,0,1)
> Now here is the main question.
> I need to evaluate this function at the points (0,0,0) through (1,1,1)

In[9]:= f@@@Tuples[{0,1},3]
Out[9]= {f[0,0,0],f[0,0,1],f[0,1,0],f[0,1,1],f[1,0,0],f[1,0,1],f[1,1,0],f[1,1,1]}

or to do all your functions at once:
In[35]:= funcs={f,g,h};
Out[37]= f[0,0,0]	g[0,0,0]	h[0,0,0]
f[0,0,1]	g[0,0,1]	h[0,0,1]
f[0,1,0]	g[0,1,0]	h[0,1,0]
f[0,1,1]	g[0,1,1]	h[0,1,1]
f[1,0,0]	g[1,0,0]	h[1,0,0]
f[1,0,1]	g[1,0,1]	h[1,0,1]
f[1,1,0]	g[1,1,0]	h[1,1,0]
f[1,1,1]	g[1,1,1]	h[1,1,1]

  • Prev by Date: Re: Re: Simplify (-1)^((-1)^n)
  • Next by Date: Re: Dialogs and inheritance
  • Previous by thread: Evaluation Question
  • Next by thread: Re: Evaluation Question