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

MathGroup Archive 2007

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

Search the Archive

Re: Block[], OpenRead[], & /@

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75891] Re: Block[], OpenRead[], & /@
  • From: CKWong.P at gmail.com
  • Date: Sun, 13 May 2007 05:36:02 -0400 (EDT)
  • References: <f23pbj$nh8$1@smc.vnet.net>

A quick fix is to simply replace one with dat[#], i.e.,

Block[{str}, str = OpenRead[#];
      Skip[str, Record, 4, NullRecords ->
      False]; dat[#] = ReadList[str, Table[
        Number, {i, 1, 19}]]; Close[str]] & /@ files

Your data are now stored in dat.  Retrieve them thus:
    dat[ files[[ i ]] ]      for the data in the  i th file.
    dat[#]&/@files      for all of them.



  • Prev by Date: error message Convert::incomp in units package of Mathematica 6.0
  • Next by Date: Re: Shadows in Mathematica 6
  • Previous by thread: RE: Block[], OpenRead[], & /@
  • Next by thread: Re: Block[], OpenRead[], & /@