Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Create array of data files

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88076] Re: Create array of data files
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 23 Apr 2008 06:05:21 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <fumquv$sdt$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

no we don't know that even a For[] command exist and I have never used 
it, but

mtx = Table[Random[], {10}, {10}];

MapIndexed[
  Export["c:/temp/dta" <> ToString[#2[[1]]] <> ".txt", #1,
    "Table"] &, mtx]

will do what you want, without a For[] or Do[] ..

Regards
   Jens

Modeler wrote:
> Hi there,
> 
> does anyone know how to write standard multicolumn numerical data sets generated by a "for" loop into an array of data files with names "dataset%.txt", where % is iteratively given by the value of the loop index? Thanks a lot.
> 


  • Prev by Date: Generating HTML like online Documentation Center
  • Next by Date: Re: installing Playe rPro killed using Mathematica itself: BEWARE!
  • Previous by thread: Re: Create array of data files
  • Next by thread: When Find finds something -