MathGroup Archive 2001

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

Search the Archive

Random often fails to return a result

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30513] Random often fails to return a result
  • From: Todd.Flach at dnv.com (Todd Flach)
  • Date: Fri, 24 Aug 2001 20:58:08 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I have a non-repeatable error that I wonder if someone can explain. I
am using Random to extract elements of three lists. The Table command
shows essentially how I do this. The output looks OK except sublist 9
has an element called List instead of returning a value. This
extraction error is occurring randomly. I have examined the three
lists to check if there are any "holes". There are no holes.

Thanks in advance for any advice!

Table[{starts[[Random[Integer, 100]]], investmentEnds[[Random[Integer,
100]]],
     investmentLevels[[Random[Integer, 100]]]}, {10} ]

{{1.16922, 2.25868, 8.36433}, {2.10013, 5.63926, 8.81981}, {3.85993,
3.03134,
    3.51252}, {0.0660932, 2.43429, 9.08009}, {0.547191, 2.05618, 
    10.5471}, {0.512352, 0.868572, 11.7632}, {0.223057, 5.59492, 
    4.31098}, {2.52853, 2.85432, 8.77673}, {3.85993, 2.25868, 
    List}, {0.179792, 1.03656, 9.36414}}


  • Prev by Date: How do I script the evaluation of a Notebook
  • Next by Date: Collecting multiple function arguments into a List?
  • Previous by thread: Re: How do I script the evaluation of a Notebook
  • Next by thread: Re: Random often fails to return a result