MathGroup Archive 1996

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

Search the Archive

How to plot a date file? Some questions, some solutions.

The following is a file that I want to plot
as either R versus FQ or DG versus FQ.
Note it has three columns of numbers preceeded
by two letter identifiers R_, DG, FQ, where
R_ is a two letter identifier. _ denotes
white space.

R  999.1E-3,DG 000.0E+0,FQ 1.000E+3
R  999.1E-3,DG 000.0E+0,FQ 1.023E+3
R  999.1E-3,DG 000.0E+0,FQ 1.047E+3
R  999.1E-3,DG 000.0E+0,FQ 1.072E+3
R  999.1E-3,DG 000.0E+0,FQ 1.096E+3
R  999.1E-3,DG 000.0E+0,FQ 1.122E+3
R  999.1E-3,DG 000.0E+0,FQ 1.148E+3
R  999.1E-3,DG 000.0E+0,FQ 1.175E+3
R  999.1E-3,DG 000.0E+0,FQ 1.202E+3
R  999.1E-3,DG 000.0E+0,FQ 1.230E+3
R  998.9E-3,DG 000.0E+0,FQ 7.244E+3
R  998.9E-3,DG 000.0E+0,FQ 7.413E+3
R  999.0E-3,DG 000.0E+0,FQ 7.585E+3
R  998.9E-3,DG 000.0E+0,FQ 7.762E+3
R  998.9E-3,DG 000.0E+0,FQ 7.943E+3
R  998.9E-3,DG 000.0E+0,FQ 8.128E+3
R  999.0E-3,DG 000.0E+0,FQ 8.317E+3
R  999.0E-3,DG 000.0E+0,FQ 8.511E+3
R  999.0E-3,DG 000.0E+0,FQ 8.709E+3
R  999.0E-3,DG 000.0E+0,FQ 8.912E+3
R  999.0E-3,DG 000.0E+0,FQ 9.120E+3
R  999.0E-3,DG 000.0E+0,FQ 9.332E+3
R  998.8E-3,DG-000.0E+0,FQ 9.999E+3
R  998.8E-3,DG-000.0E+0,FQ 10.00E+3

The format is consistent. There is no space between a two letter
identifier and the number.

R followed by a space, then an optional sign, ie - for minus or 
space for plus. The number part is 4 digit and one decimal sign.
The Exponent is one digit with a mandatory sign, then a comma separator, 
and next two letter identifier DG, followed by no space and
so on.

The first problem is to separate the list into three columns
and ignoring 


This is done by the following ReadList command.

a=ReadList["c:\\file", Word, 
WordSeparators -> {"R", ",DG", ",FQ"}, 

For RecordList -> True, see page 182, 
For WordSeparators -> {}, see p 496,

This has one PROBLEM. Although all the three number fields are separated,
they are not numbers any more, but words.

The second problem is to get any two columns from the three columns so that
they can be plotted using 


command. I do not see how to directly get two columns other than transposing
getting the rows, and then transposing back again, ie


Can some kind soul help? Pls reply via email also.
Thanks a lot!


  • Prev by Date: Problems running Mathematica 2.2.3 under Windows95
  • Previous by thread: Re: How to plot a date file? Some questions, some solutions.
  • Next by thread: Problems running Mathematica 2.2.3 under Windows95