MathGroup Archive 2009

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

Search the Archive

Re: Problems in writing into a sequential filename

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97097] Re: Problems in writing into a sequential filename
  • From: dh <dh at metrohm.com>
  • Date: Thu, 5 Mar 2009 04:54:49 -0500 (EST)
  • References: <golquh$qab$1@smc.vnet.net>


Hi Xavier,

Sr >>> Nomfich is an abreviation and does not do any parameter 

substitution, "Nomfich" is taken literally. Therefore, you want to use 

the full command: PutAppend.



Concerning the non-apearing Plot, in version 6+7 graphics is treated 

equal to text. You must wrap "Print" around the Plot.

hope this helps, Daniel



xabart at gmail.com wrote:

> 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,

> Cheers

> Xavier

> 

> The code:

> 

>  ClearAll["Global`*"];

> Do[

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

> 

>   Print[Nomfich];

>   poiuy4  = OpenWrite[Nomfich];

> 

>   Sr >>> Nomfich;

>   1 >>> Nomfich;

>   Close[Nomfich];

> 

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

> 




  • Prev by Date: Re: Problems in writing into a sequential filename
  • Next by Date: Re: Legends in GraphicsGrid
  • Previous by thread: Re: Problems in writing into a sequential filename
  • Next by thread: Re: Problems in writing into a sequential filename