MathGroup Archive 2007

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

Search the Archive

Re: pure function to generate a list of integrals


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