MathGroup Archive 2005

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

Search the Archive

Re: Writing result of "Do" in a single List


Laurent Feuz wrote:
> Hi
> When I am calculating values with the
> Do[expr, {i, imin, imax, di}]
> expression, I get single values as a result that are a pain to export.
> 
> How can I write these values in a list that then can easily be exported?
> 
> Thanks for any hints!
> best
> Laurent
>
Hi Laurent,

Hmmm...
  didn't try it but I would expect Null as result.

  (expr/.i->#&)/@Range[imin,imax,di]
or
  Reap[Do[Sow[expr], {i, imin, imax, di}]][[-1, 1]]

should do what you want

-- 
Peter Pein
Berlin


  • Prev by Date: Re: Writing result of "Do" in a single List
  • Next by Date: Re: Writing result of "Do" in a single List
  • Previous by thread: Re: Writing result of "Do" in a single List
  • Next by thread: Re: Writing result of "Do" in a single List