MathGroup Archive 2007

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

Search the Archive

Re: issue generating table of random numbers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81901] Re: [mg81877] issue generating table of random numbers
  • From: DrMajorBob <drmajorbob at bigfoot.com>
  • Date: Sat, 6 Oct 2007 04:38:49 -0400 (EDT)
  • References: <914538.1191598805680.JavaMail.root@m35>
  • Reply-to: drmajorbob at bigfoot.com

Of course it's a bug!

Table[RandomChoice[{-1, 1}, {4, 4}], {249}] // Dimensions

{249, 4, 4}

Table[RandomChoice[{-1, 1}, {4, 4}], {251}] // Dimensions

{251, 1, 16}

Bobby

On Fri, 05 Oct 2007 03:57:58 -0500, John Molina <johnjmolina at gmail.com> 
wrote:

> Hi, I'm running Mathematica 6 on OsX (10.4) and have been experiencing 
> difficulties generating a table of random numbers (a table of random  
> matrices actually).
> matrix = Table[RandomChoice[{-1, 1}, {4, 4}], {250}]
> for a table size less than 250 it seems to work fine but for larger  
> sizes mathematica is flattening out the lists:
> matrix[[i]] = {-1,1,1,-1}
> and not
>             = {{-1,1},{1,-1}}
> As far as I can tell this is only happening with the RandomChoice  
> command (RandomInteger and RandomReal work fine). Does anyone know what  
> is happening? is this a bug?
> thanks
>
>



-- 

DrMajorBob at bigfoot.com


  • Prev by Date: Re: Re: BarChart - intensity of colour increases up the bar
  • Next by Date: Re: issue generating table of random numbers
  • Previous by thread: Re: issue generating table of random numbers
  • Next by thread: Re: issue generating table of random numbers