From: David B. <Dav...@mo...> - 2004-11-08 11:27:28
|
I can't regenerate this problem with octave-forge CVS or with 2004.09.09. I used the commands octave:1> hist(randn(1,1e6),-3.75:0.5:3.75) octave:2> var(randn(1,1e6)) ans =3D 1.0001 octave:3> mean(randn(1,1e6)) ans =3D -4.9951e-04 Which clearly showed a normal distribution and the correct mean and varianc= e. Maybe your problem is to do with the seeding of the generator, however it this case you would also have a poor return from rand from octave-forge, since they both use the same basic generator... Try running randn("seed", 12345) before doing your test and seed if it helps. It might also be a build issue, so can you try with the "-DALLBITS" flag or without it and see if it makes a difference if 32 or 64 bit ints are used. It would be better if you can properly diagnose your problem, as the randn generator in 2.1.57 is much shorter period than that from octave-forge and is much slower, but equally is the report of the form you sent does no one any good, and if it is a true bug others should profit from your problems/solutions. Regards David According to Justus Piater <Jus...@UL...> (on 11/08/04): > Hi, >=20 > randn() from octave-forge-2004.09.09 (CVS version 1.11) appears to be > broken. The generated numbers are clearly not normally distributed: > Numbers near zero (the most likely numbers) are extremely rare, and > stretches of generated numbers appear to be sampled from different > distributions that vary from some 10s to some 1000s of numbers in > length. >=20 > See for yourselves by issuing >=20 > plot(1:10000, randn(1, 10000), "."); >=20 > I have not tested later versions from CVS, but the CVS logs do not > suggest that this has been fixed. For my purposes, I'm reverting back > to the randn() from octave-2.1.57 whose output looks ok. >=20 > Justus >=20 > --=20 > Justus H. Piater, Ph.D. http://www.montefiore.ulg.ac.be/~piater/ > Institut Montefiore, B28 Phone: +32-4-366-2279 > Universit=E9 de Li=E8ge, Belgium Fax: +32-4-366-2620 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_idU88&alloc_id=12065&op=3Dclick > _______________________________________________ > Octave-dev mailing list > Oct...@li... > https://lists.sourceforge.net/lists/listinfo/octave-dev --=20 David Bateman Dav...@mo... Motorola CRM +33 1 69 35 48 04 (Ph)=20 Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)=20 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as:=20 [x] General Business Information=20 [ ] Motorola Internal Use Only=20 [ ] Motorola Confidential Proprietary |