Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7934

Re: plotting histograms with do loop

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: plotting histograms with do loop
Date 2012-01-17 08:50 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jf3cnr$nos$1@smc.vnet.net> (permalink)
References <201201162213.RAA15471@smc.vnet.net>

Show all headers | View raw


>From the documentaton for Do:  "Unless an explicit Return is used, the
value returned by Do is Null. "

Use Table

Table[Histogram[RandomReal[NormalDistribution[0, i], 500],
   ImageSize -> 360], {i, 5}] // Column

Or Print within the Do

Do[Print[Histogram[RandomReal[NormalDistribution[0, i], 500]]], {i, 5}]


Bob Hanlon

On Mon, Jan 16, 2012 at 5:13 PM, hanciong awesome <hanciong@gmail.com> wrote:
> hello all, I want to plot several histograms with do-loop. It is
> histogram of normal distribution, all with mean zeros, and standard
> deviation successively increasing from 1 to 5. I do the following:
>
> Do[   Histogram[RandomReal[NormalDistribution[0, i], 500]],
>  {i, 1, 5}  ]
>
> But it doesn't give anything. could anyone help me? Thanx
>



--
Bob Hanlon

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: plotting histograms with do loop Bob Hanlon <hanlonr357@gmail.com> - 2012-01-17 08:50 +0000

csiph-web