MathGroup Archive 2009

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

Search the Archive

Re: accessing data in a large file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95846] Re: accessing data in a large file
  • From: dh <dh at metrohm.com>
  • Date: Wed, 28 Jan 2009 06:34:17 -0500 (EST)
  • References: <glmst9$mlp$1@smc.vnet.net>


Hi,

I have not tried it out, but according to the manual:

"BinaryReadList[stream] reads from an open input stream, as returned by 

OpenRead with BinaryFormat->True. "

Therfore, ReadList should be able to continue reading where the former 

ReadList left off.:

  inFile = OpenRead["DR.wav", BinaryFormat -> True];

  y1 = BinaryReadList[inFile, "Integer16", n];

  y2 = BinaryReadList[inFile, "Integer16", n];

Close[inFile];



hoper this helps, Daniel





wb at wavebounce.com wrote:

> I'm trying to get data from a 450MB file. I can get the first 300MB (or 150 000 000 Integer16) with the code below but any more than that causes Mathematica 7 to shut down with out of memory error (WinXP, SP3, 2GB RAM).

> 

> n = 150000000; 

> inFile = OpenRead["DR.wav", BinaryFormat -> True];

> y = BinaryReadList[inFile, "Integer16", n];

> Close[inFile];

> 

> My reading of the documentation indicates that the only option I have with BinaryReadList is to read from the start of the file to depth n (negative values of n it won't accept). If I could start reading from some point into the file, I could split the file up into pieces by exporting segments to other files. Also, I've found nothing in the documentation that tells me how Mathematica 7 might use the HD to store some of this data as I read it in.  Can anyone suggest a method (however slow) that would allow me access to all the data in this file?  Thanks.

> 




  • Prev by Date: Re: opacity "bleeds" in V7 graphics? [compared to V6]
  • Next by Date: Re: specifying the integration interval using a function
  • Previous by thread: Re: accessing data in a large file
  • Next by thread: Re: accessing data in a large file