Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

animating a histogram

5 views
Skip to first unread message

Ole_Rømer

unread,
Jan 5, 2010, 3:34:12 PM1/5/10
to
Hi

Does anyone know how I kan animate a histogram. I want to show how the
simulated chi^2 distribution builds up to the theoretical chi^2-
distribution.

I have tried this:
with(Statistics);
animate(Histogram, [ L_[1..floor(j) ] ] , j=1..1000);

where L is a list af chi^2 (numbers)
but it doesn't work.

help me
O.Rømer

Preben Alsholm

unread,
Jan 6, 2010, 4:29:16 AM1/6/10
to
Ole_R�mer skrev:

> I have tried this:
> with(Statistics);
> animate(Histogram, [ L_[1..floor(j) ] ] , j=1..1000);
>
> where L is a list af chi^2 (numbers)
> but it doesn't work.

The basic problem seems to be that floor(j) in animate is not handing
the vector L_ an integer. This is a common problem and can be handled
like this:

p:=j->Histogram(L_[1..floor(j)]):
plots:-animate(p, [j] , j=1..1000);

Preben Alsholm

0 new messages