Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: String to numbers

  • To: mathgroup at
  • Subject: [mg55361] Re: String to numbers
  • From: bghiggins at
  • Date: Sun, 20 Mar 2005 04:11:53 -0500 (EST)
  • References: <d1gu3b$p0$>
  • Sender: owner-wri-mathgroup at

John, Here is one way. let us suppose the data is in a file that we
import into Mathematica
data = Import["/Users/brian/Desktop/data.text", "CSV"]

Here is what the data looks like

FullForm=List[List["<2.54 3.11 2.89> "],List["<3.58 5.24 5.66> "]]

Now we make use of StringToStream  to create an input stream for each
String, and then use ReadList to read in each data point which is then
transformed into an expression

          Word,WordSeparators->{"<"," ",">"}]]&,data]//FullForm




  • Prev by Date: Re: nonLinearFit and nonLinearRegress
  • Next by Date: Re: filling in an array
  • Previous by thread: String to numbers
  • Next by thread: Re: String to numbers