MathGroup Archive 2009

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

Search the Archive

Problems in writing into a sequential filename

  • To: mathgroup at
  • Subject: [mg97051] Problems in writing into a sequential filename
  • From: xabart at
  • Date: Wed, 4 Mar 2009 07:10:09 -0500 (EST)

Hi everybody

I am enjoying the beautiful rules of programming in mathematica, and I
step onto a rock:
How can I write datas into a sequential filename?
Let's explain myself, with an exemple below:

First I work on mathematica 6.0.2 on linux

I want to make a Do loop in witch I choose values for a variable: Sr
(here, 0.5 and 1)
Then I concatenate a "pattern" and the value (here RappSr and the
value) and put the name into a variable (Nomfich)
then I open the file (It works)
But then, the problem is it does not write into the file, but it close
it normally.

So How can I do this not-so-tricky-thing in Mathematica?

And by the way, I can't plot graphes into any Loop neither.

Thanks for all your help,

The code:

Nomfich = ToString["RappSr" <> ToString[Sr]];

  poiuy4  = OpenWrite[Nomfich];

  Sr >>> Nomfich;
  1 >>> Nomfich;

  , {Sr, {0.5, 1}}];

  • Prev by Date: Re: Head logic
  • Next by Date: Re: Experimental Mathematica debugger
  • Previous by thread: Re: Looking to time how long a command takes in mathematica 6 tia
  • Next by thread: Re: Problems in writing into a sequential filename