MathGroup Archive 2000

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

Search the Archive

Re: Monte Carlo

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22698] Re: Monte Carlo
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Wed, 22 Mar 2000 00:28:05 -0500 (EST)
  • References: <8aqtan$ak0@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Mark

We can make the random data directly in Mathematica 

data = Table[Random[], {10}, {2}];

But here I export to a file and Import it back

Export["data.dat", data];
Import["data.dat"]

The extension dat told Export and Import how to behave

Here is a simple animation technique - please not the specification of
PlotRange - without this the picure may jump about.

Do[ListPlot[Take[data, n], PlotStyle -> {PointSize[.02]},
    PlotRange -> {{0, 1}, {0, 1}}], {n, 10}]

Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565



"mark griggs" <markgriggs at sc.rr.com> wrote in message
news:8aqtan$ak0 at smc.vnet.net...
> Hello All,
>     I have a question about plotting points.  I have written a small
> fortran program that produces two columns of random numbers.  I need to
> do an animation in which every single point is plotted separately for a
> demonstration.  How can I get mathematica to plot individual points read
> from a separate data file.  The route I am considering is producing a
> whole bunch of pics and then double clicking on one  to animate.  Is
> there a better way than this?  I hope to show the points accumulate on
> the graph.
>
> regards
>
> mark
>




  • Prev by Date: Re: cubic polynomial
  • Next by Date: Re: data structures
  • Previous by thread: Monte Carlo
  • Next by thread: Mathematica 4.0.1 and Linux: Problems?