Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*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 1996

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

Search the Archive

Re: equ. of 'ls' in 'Context' ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4851] Re: equ. of 'ls' in 'Context' ?
  • From: Mats Cedervall <cederval at isl.stanford.edu>
  • Date: Thu, 26 Sep 1996 22:42:13 -0400
  • Organization: Stanford University
  • Sender: owner-wri-mathgroup at wolfram.com

lbliao wrote:

> 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
> ...

> The first problem is to separate the list into three columns
> and ignoring
> 
> R
> ,DG
> ,FQ
> 
> This is done by the following ReadList command.
> 
> a=ReadList["c:\\file", Word,
> WordSeparators -> {"R", ",DG", ",FQ"},
> RecordLists->True]

Try, e.g.

Map[ToExpression[StringReplace[#1,{"E"->" 10^"}]]&
    ,ReadList["file", Word, 
        WordSeparators -> {"R", ",DG", ",FQ"," "},
        RecordLists->True
     ]
    ,{2}
]

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

See e.g. the package LinearAlgebra`MatrixManipulation`

------------------------------
Mats Cedervall
Information Systems Laboratory
Stanford University

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: Slowdown of MMA running WIN95 and what to do about it
  • Next by Date: Optic For Sale-Best Offer
  • Previous by thread: Re: equ. of 'ls' in 'Context' ?
  • Next by thread: m*y''[t]+c*y'[t]+k*y[t]==h/(a-y[t])^2