Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*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: pure function to generate a list of integrals

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77084] Re: pure function to generate a list of integrals
  • From: chuck009 <dmilioto at comcast.com>
  • Date: Sun, 3 Jun 2007 06:07:31 -0400 (EDT)

Probably not what you wanted but this is how I'd do it:

f[x_]:=x^2;

g[fun_,lst_]:=NIntegrate[fun[u],{u,0,#}]&/@lst[[2]];


In[20]:=
list={f,{1,2,3,4}};
g[f,list]

Out[21]=
{0.333333,2.66667,9.,21.3333}


  • Prev by Date: Problem with Mathematica 6
  • Next by Date: Running the .NET examples in V6
  • Previous by thread: pure function to generate a list of integrals
  • Next by thread: Re: pure function to generate a list of integrals