Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Compile and NormalDistribution

  • To: mathgroup at
  • Subject: [mg15182] Re: [mg15187] Compile and NormalDistribution
  • From: Andrew Watson <abwatson at>
  • Date: Fri, 18 Dec 1998 23:20:24 -0500
  • Sender: owner-wri-mathgroup at

At 11:11 PM -0800 12/17/98, Brett Patterson wrote:
>I am trying to speed up the generation of a large array of random
>complex Gaussian numbers (e.g. 360 x 360).

How about:


gaussianArray[n_] :=
	RandomArray[NormalDistribution[0.0, 1.0],{n,n}]  +
	 I  RandomArray[NormalDistribution[0.0, 1.0],{n,n}]

Timing[tmp=gaussianArray[128] ;]

{1.26667 Second,Null}


-1.25342-0.570081 I

Andrew B. Watson
MS 262-2
NASA Ames Research Center
Moffett Field, CA 94035-1000
(650) 604-5419	(650) 604-0255 fax
abwatson at

  • Prev by Date: Including Mathematica notebooks in LaTeX
  • Next by Date: Question about how Contex resolving works in Mathematica
  • Previous by thread: Compile and NormalDistribution
  • Next by thread: Re: Compile and NormalDistribution