MathGroup Archive 1996

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

Search the Archive

Re: ListPlot the output of Print

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4457] Re: ListPlot the output of Print
  • From: wagner at motel6.cs.colorado.edu (Dave Wagner)
  • Date: Mon, 29 Jul 1996 02:37:15 -0400
  • Organization: University of Colorado, Boulder
  • Sender: owner-wri-mathgroup at wolfram.com

In article <4shubo$g7n at ralph.vnet.net>, Mike <Mike at utk.edu> wrote:
>MathGroupers:
>How can I easily render the output of a print statement to ListPlot without 
>the cut & paste routine. 
>Example: 
>
>Do [ Print[ N[ {x,Sin[x]} ] ] , {x,0,2Pi,Pi/6}]
>
>{0, 0}
>{0.523599, 0.5}
>...
>
>I don't want to use Table[] because I need to monitor the output as they get 
>printed.Sin[x] is just a simple example, the real function is much more 
>complicated.

Try

    Module[{t},
	Table[ Print[{x, t=Sin[x]}]; {x,t}, {x,0,2Pi,Pi/6}]
    ]

You can stick a print statement virtually anywhere if you follow it with
a semicolon.  I'm using a temporary variable t to hold the function result
because I'm assuming it may take a long time to compute.

		Dave Wagner
		Principia Consulting
		(303) 786-8371
		dbwagner at princon.com
		http://www.princon.com/princon

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


  • Prev by Date: Re: Horner scheme function ?
  • Next by Date: Re: Help with ParametricPlot3D in color
  • Previous by thread: Re: ListPlot the output of Print
  • Next by thread: partial diferential ecuations