MathGroup Archive 2007

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

Search the Archive

on a pure function for a list of integrals


Thanks, Jean-Marc, you suggest

f = Block[{x, a = #1, b = #2},
         (NIntegrate[Sqrt[a*x + b], {x, 0, #1}] & ) /@ #3] & ;
f[2, 3, {0.1, 0.5, 0.9}]

but I think there are assignments which are never used as

In[1]:= f = Block[{x},
         (NIntegrate[Sqrt[a*x + b], {x, 0, #1}] & ) /@ #3] & ;
f[2, 3, {0.1, 0.5, 0.9}]

gives me exactly the same result so the bit a = #1, b = #2 seems unnecessary



  • Prev by Date: Re: Anyone used the Notation package in v6 already?
  • Next by Date: Re: Mapping a pure function with 2 conponents.
  • Previous by thread: Re: NDSolve Errors: icfail and ntdv
  • Next by thread: Re: on a pure function for a list of integrals