Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Importing external grid file to do contour plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13045] Re: Importing external grid file to do contour plot
  • From: immtwg at busk.gbar.dtu.dk (Torben Winther Graversen)
  • Date: Sat, 4 Jul 1998 16:44:50 -0400
  • Organization: UNI-C
  • References: <6nc6vu$fbb@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Sophie Hon (shon at vt.edu) wrote:
: I'm trying to read an outside grid file into Mathematica in order to do
: a contour plot.  It's a 50 by 50 grid, so that the data is arranged as
: 50 strings of 50 numbers.
: Here is what I have so far, which I know does not work:

: ReadList["Macintosh HD:Mathematica 3.0 Files:fish:aqc.grd",
: Array[Number,{50,50}]]

Try this one:

M = ReadList["Macintosh HD:Mathematica 3.0 Files:fish:aqc.grd",
      Number, RecordLists -> True];

It just reads every number into a list, making a new sublist for each
new line in the file. This works for a matrix of any dimensions. After
reading, check it's size with

Dimensions[M]

I hope this helps.
--
Best regards,

  Torben Winther Graversen
  http://www.student.dtu.dk/~immtwg


  • Prev by Date: Re: Importing external grid file to do contour plot
  • Next by Date: Simplifying Derivatives
  • Previous by thread: Re: Importing external grid file to do contour plot
  • Next by thread: logical inconsistency in Union