MathGroup Archive 2011

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

Search the Archive

Re: Conditional Import

  • To: mathgroup at
  • Subject: [mg122393] Re: Conditional Import
  • From: Leonid Shifrin <lshifr at>
  • Date: Thu, 27 Oct 2011 06:31:18 -0400 (EDT)
  • Delivered-to:
  • References: <>

As an alternative to writing your own import converter, which is a heavier
approach, you may try Read/ReadList or even BinaryRead/BinaryReadList. These
are fast (especially Binary..) lower-level functions which read from a
stream and might be enough for your purposes.


On Thu, Oct 27, 2011 at 1:39 AM, <sebastian.mansfeld at> wrote:

> Hi!
> I would like to import data from a very large text file. If I import all
> the data, Mathematica takes around 9 h to complete. Therefore I would like
> to import conditionally, that is for example only every 5th element. It
> would probably be best to do this using low level function. I have found a
> help topic on this (developing an import converter), however I can not get
> it to work. Specifically, I do not understand how to implement my own import
> converter, and how I can then use this to only import every 5th element of a
> file.
> Thank you!

  • Prev by Date: DSolve bug for complicated forcing functions in a 2nd order ODE
  • Next by Date: Re: Coin Toss Sim
  • Previous by thread: Conditional Import
  • Next by thread: zigzag structure