This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

RandomComplex

RandomComplex[]
gives a pseudorandom complex number with real and imaginary parts in the range 0 to 1.
RandomComplex[{z_(min),z_(max)}]
gives a pseudorandom complex number in the rectangle with corners given by the complex numbers zmin and zmax.
RandomComplex[zmax]
gives a pseudorandom complex number in the rectangle whose corners are the origin and zmax.
RandomComplex[range, n]
gives a list of n pseudorandom complex numbers.
RandomComplex[range, {n1, n2, ...}]
gives an n_1⨯n_2⨯… array of pseudorandom complex numbers.
  • RandomComplex chooses complex numbers with a uniform probability distribution in the rectangle specified.
  • RandomComplex[range, WorkingPrecision->n] yields complex numbers with n-digit precision. Leading or trailing digits in the generated number can turn out to be 0.
  • RandomComplex gives a different sequence of pseudorandom reals whenever you run Mathematica. You can start with a particular seed using SeedRandom.
  • A Method option to SeedRandom can be given to specify the pseudorandom generator used.
A random complex number with real and imaginary parts in the range 0 to 1:
In[1]:=
Click for copyable input
Out[1]=
 
A random complex number in the rectangle with corners at -2-ⅈ and 5+3 ⅈ:
In[1]:=
Click for copyable input
Out[1]=
 
A random complex number in the rectangle with corners at 0 and 10+5 ⅈ:
In[1]:=
Click for copyable input
Out[1]=
 
5 random complex numbers in the unit square:
In[1]:=
Click for copyable input
Out[1]=
 
A 3×2 array of random complex numbers in the rectangle with corners at 2+ⅈ and 10+20 ⅈ:
In[1]:=
Click for copyable input
Out[1]=
New in 6