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

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

Search the Archive

Re: How to read a string from a file?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46949] Re: How to read a string from a file?
  • From: "Hans Michel" <hansjm at bellsouth.net>
  • Date: Wed, 17 Mar 2004 02:29:04 -0500 (EST)
  • References: <c36bm6$s4j$1@smc.vnet.net>
  • Reply-to: "Hans Michel" <hansjm at bellsouth.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Try
ListPlot[Range[10], PlotLabel -> Evaluate[Import["c:\\outpara.txt",
"Text"]]]
This is a long text it will be cut off.

Also look into Legend in the Help Files.

Hans

"Peng Yu" <yupeng_ at hotmail.com> wrote in message
news:c36bm6$s4j$1 at smc.vnet.net...
> I have a file called outpara.txt.
> The content is
"M=70,N=90,L=100,S0=0.0001,S1=0.1,mu=0,D=0.01,m=2,n=2,m1=2,n1=2,k1=1,k2=1,k_
2=1,k3=1,k_3=1,D1=0.01,k4=1,k_4=1,D2=0.01,k5=1,k_5=1,k6=1,k_6=1,k7=1,k_7=1,k
8=1,k_8=1,k9=1,k_9=1,DELTA_T=0.1,DURATION=5000000,SAMPLE_PERIOD=50000"
>
> I want Mathematica read the content of the file into a string. And
> then display this string as the caption of a graph generated by
> ListPlot.
>
> I tried a few ways but it doesn't work. Could you help me?
>


  • Prev by Date: Exporting data and comments
  • Next by Date: Re: Mathematica 5: Integration bug in quadratic found by the GEMM machine
  • Previous by thread: Re: How to read a string from a file?
  • Next by thread: Re: How to read a string from a file?