Re: Need help with Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg115907] Re: Need help with Mathematica
- From: Oliver Ruebenkoenig <ruebenko at wolfram.com>
- Date: Tue, 25 Jan 2011 06:29:55 -0500 (EST)
On Tue, 25 Jan 2011, Martin Vavpoti wrote: > Hello to everyone. > > I am in dire need of some assistance with Mathematica. First of all, I > need to know how to write a for loop that would create a series of > output files numbered according to the index of the said loop. For > instance, I want to feed Mathematica with a series of input files > named P1.txt, P2.txt, etc. The equation I'm working on outputs three > files: Q1.txt, R1.txt, S1.txt for the first input. I want the loop to > tell my program how to name my files. > > I know how to do this in another system, but I'm rather new with Mathematica. > I've been trying to find a solution for days but apparently the > difference between both programs is enough for me not to find it. > > Any help would be greatly appreciated. > > Do[ Print["P" <> ToString[PaddedForm[step, 4, NumberPadding -> "0"]] <> ".txt"]; , {step, 1, 4}] Hth, Oliver