Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Append to a file?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47522] Append to a file?
  • From: Nathan Moore <nmoore at physics.umn.edu>
  • Date: Thu, 15 Apr 2004 03:39:34 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Suppose I have a really difficult calculation that I perform - a nested 
sum,

For[
	For[ something_really_hard,{i,0,20}],
	{j,0,50}
]

where "something_really_hard" is a calculation that takes several 
minutes.  Total execution time is going to be several hours, and I'd 
rather not have the calculation go most of the day and the fail at the 
last minute.

Each execution of "something_really_hard" produces a vector of numbers 
as a result.  I could of course store this vector as a list and then 
export it to file after the evaluation finishes, but I'd rather not 
risk losing that execution time.

Is there an "Append-Export" command which I could use to append the 
state of my evaluation to the data file?  The c programming corollary 
I'm thinking of is fflush()?  I'm imagining Mathematica adding one line 
to the data file each time the inner for loop iterates.

Nathan Moore
University of Minnesota Physics


  • Prev by Date: Re: RE: Re: Is there any productive way to use Mathematica + pdfLaTeX?
  • Next by Date: Re: number of switches
  • Previous by thread: Re: Alternative to defining 'operator' function?
  • Next by thread: Re: Append to a file?