MathGroup Archive 1998

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

Search the Archive

Re: Making a large matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14844] Re: [mg14832] Making a large matrix
  • From: Clemens Frey <clemens.frey at bitoek.uni-bayreuth.de>
  • Date: Fri, 20 Nov 1998 02:16:53 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

> Date: Wed, 18 Nov 1998 01:29:37 -0500
> From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
To: mathgroup at smc.vnet.net
> To: mathgroup at smc.vnet.net
> Subject: [mg14844] [mg14832] Making a large matrix
>
> Consider the timing experiments below for making a large matrix of
> random real numbers.
>
> In[1]:=
> Table[Table[Random[],{1000}],{500}];//Timing Out[1]=
> {17.47 Second,Null}
>
> In[2]:=
> Table[Range[Random[],1000],{500}];//Timing Out[2]=
> {9.56 Second,Null}

Ted,

I don't think that these timings are comparable since the things they do
are different.

This produces 10 random numbers between 0 and 1:

Table[Random[],{10}]

{0.132055,0.668036,0.527731,0.35746,0.0925349,
0.0799395,0.946264,0.037643, 0.224293,0.827124}


...but this produces 10 successive numbers, starting at a random number
between 0 and 1 :

Range[Random[],10]

{0.530468,1.53047,2.53047,3.53047,4.53047,
5.53047,6.53047,7.53047,8.53047,  9.53047}

Clemens





  • Prev by Date: Re: Making a large matrix
  • Next by Date: Artlandia: student version
  • Previous by thread: Re: Making a large matrix
  • Next by thread: RE: Re: Making a large matrix