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: ListPlot the output of Print

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4462] Re: ListPlot the output of Print
  • From: rubin at msu.edu (Paul A. Rubin)
  • Date: Mon, 29 Jul 1996 02:37:18 -0400
  • Organization: Michigan State University
  • Sender: owner-wri-mathgroup at wolfram.com

In article <4shubo$g7n at ralph.vnet.net>, Mike at utk.edu (Mike) wrote:
->MathGroupers:

Well, at least you didn't call us "MathGroupies" ... :-)

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

In[]:=
  y = {};
  Do [ Print[z = N[ {x,Sin[x]} ]; AppendTo[y, z]; z ] , {x,0,2Pi,Pi/6}]
  ListPlot[y]

Paul

**************************************************************************
* Paul A. Rubin                                  Phone: (517) 432-3509   *
* Department of Management                       Fax:   (517) 432-1111   *
* Eli Broad Graduate School of Management        Net:   RUBIN at MSU.EDU    *
* Michigan State University                                              *
* East Lansing, MI  48824-1122  (USA)                                    *
**************************************************************************
Mathematicians are like Frenchmen:  whenever you say something to them,
they translate it into their own language, and at once it is something
entirely different.                                    J. W. v. GOETHE

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


  • Prev by Date: Revealing HiddenSurfaces
  • Next by Date: Re: Replacement
  • Previous by thread: Re: ListPlot the output of Print
  • Next by thread: Re: ListPlot the output of Print