Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Re: [mg4431] ListPlot the output of Print
Replies: 0

 Bruce Carpenter Posts: 2 Registered: 12/7/04
Re: [mg4431] ListPlot the output of Print
Posted: Jul 24, 1996 7:12 PM

At 1:39 AM 7/22/96, Mike 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}ÃÂ
>ÃÂ{1.0472, 0.866025}ÃÂ
>ÃÂ{1.5708, 1.}ÃÂ
>ÃÂ{2.0944, 0.866025}ÃÂ
>ÃÂ{2.61799, 0.5}ÃÂ
>ÃÂ{3.14159, 0}ÃÂ
>ÃÂ{3.66519, -0.5}ÃÂ
>ÃÂ{4.18879, -0.866025}ÃÂ
>ÃÂ{4.71239, -1.}ÃÂ
>ÃÂ{5.23599, -0.866025}ÃÂ
>ÃÂ{5.75959, -0.5}ÃÂ
>ÃÂ{6.28319, 0}ÃÂ
>
>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.
>Any help would be appreciated.ÃÂ
>
>Mike

Hi Mike,

You can use Table and monitor the output at the same time:

data = Table [With[{temp = {x, Sin[x]}}, Print[N[temp]];temp], {x, 0, 2Pi,
Pi/6}]

Best Regards,
Bruce Carpenter

-----------------------
Dr. Bruce Carpenter
Educational Applications Coordinator phone: (217) 398-0700
Wolfram Research, Inc. fax: (217) 398-0747
100 Trade Centre Drive email: brucec@wolfram.com
Champaign, IL 61820 web: http://www.wolfram.com