RandomTools Flavor: complex - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Random Objects : RandomTools package : Flavors : RandomTools/flavor/complex

RandomTools Flavor: complex

describe a flavor of a random complex number

 Calling Sequence complex(flav)

Parameters

 flav - random flavor

Description

 • The flavor complex describes a random complex number with real and imaginary parts described by the given random flavor flav.
 This flavor can be used as an argument to RandomTools[Generate] or as part of a structured flavor.

Examples

 > $\mathrm{with}\left(\mathrm{RandomTools}\right):$
 > $\mathrm{Generate}\left(\mathrm{complex}\left(\mathrm{integer}\right)\right)$
 ${-}{104281139460}{-}{306860183579}{}{I}$ (1)
 > $\mathrm{Generate}\left(\mathrm{complex}\left(\mathrm{rational}\left(\mathrm{range}=-3..3,\mathrm{denominator}=720\right)\right)\right)$
 ${-}\frac{{359}}{{120}}{+}\frac{{953}}{{360}}{}{I}$ (2)
 > $\mathrm{Generate}\left(\mathrm{list}\left(\mathrm{complex}\left(\mathrm{nonnegint}\left(\mathrm{range}=10\right)\right),10\right)\right)$
 $\left[{10}{+}{3}{}{I}{,}{5}{+}{4}{}{I}{,}{10}{,}{7}{+}{4}{}{I}{,}{9}{+}{10}{}{I}{,}{1}{+}{I}{,}{3}{+}{7}{}{I}{,}{10}{+}{2}{}{I}{,}{8}{+}{9}{}{I}{,}{1}{+}{10}{}{I}\right]$ (3)
 > $\mathrm{Matrix}\left(3,3,\mathrm{Generate}\left(\mathrm{complex}\left(\mathrm{integer}\left(\mathrm{range}=2..7\right)\right)\mathrm{identical}\left(x\right)+\mathrm{complex}\left(\mathrm{integer}\left(\mathrm{range}=2..7\right)\right),\mathrm{makeproc}=\mathrm{true}\right)\right)$
 $\left[\begin{array}{ccc}\left({3}{+}{7}{}{I}\right){}{x}{+}{5}{+}{2}{}{I}& \left({6}{+}{4}{}{I}\right){}{x}{+}{2}{+}{7}{}{I}& \left({6}{+}{7}{}{I}\right){}{x}{+}{5}{+}{4}{}{I}\\ \left({7}{+}{6}{}{I}\right){}{x}{+}{4}{+}{6}{}{I}& \left({5}{+}{4}{}{I}\right){}{x}{+}{3}{+}{4}{}{I}& \left({2}{+}{2}{}{I}\right){}{x}{+}{4}{+}{6}{}{I}\\ \left({6}{+}{3}{}{I}\right){}{x}{+}{3}{+}{3}{}{I}& \left({4}{+}{3}{}{I}\right){}{x}{+}{5}{+}{3}{}{I}& \left({2}{+}{6}{}{I}\right){}{x}{+}{2}{+}{5}{}{I}\end{array}\right]$ (4)

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam