MathGroup Archive 1997

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

Search the Archive

Importing of Files

  • To: mathgroup at
  • Subject: [mg5880] Importing of Files
  • From: Mario Sancho Graca <M.S.Graca at>
  • Date: Sun, 2 Feb 1997 01:31:55 -0500
  • Organization: University of Warwick
  • Sender: owner-wri-mathgroup at

To MathGroup Readers

I have files captured with a charge-coupled device camera, consisting of
512*512=262144 pixels. I need to import them into Mathematica, which I
can on a Unix workstation (Mathematica v 2.2). However I work with a PC
(Windows 95, Mathematica 3.0), the files being transferred from the Unix
machine through modem. For the example below, with the same reading
commands Mathematica identifies an 'end-of-file' after reading 28556
elements (file transferred as ascii) or 12304 elements (file transferred
as binary). There are many pixels still to read!

Do you know what is happening? It seems that the problem is Unix and
Windows handling files differently.

Illustration: For the file 'q3a1_ascii' which is a file transferred as
ascii. The following reads the first 100 points with no problem on

inputStreamq3a1ascii = OpenRead["q3a1_ascii"]

        q3a1asciiReadRow= Append[q3a1asciiReadRow,
q3a1asciiRead=Append[q3a1asciiRead, q3a1asciiReadRow];
,{100}] //Timing


The same code under Windows reads EndOfFile at

Thanking in advance all MathGroup readers for the attention given.

Mario Sancho Graca
University of Warwick
Department of Engineering
Coventry CV4 7AL
United Kingdom

Email: M.S.Graca at

  • Prev by Date: MMA 2.2.3 For Sale
  • Next by Date: Mathematica3.0 Installation
  • Previous by thread: MMA 2.2.3 For Sale
  • Next by thread: Mathematica3.0 Installation