GenerateUniform - Maple Help

SignalProcessing

 GenerateUniform
 generate samples of a uniformly distributes pseudo-random signal

 Calling Sequence GenerateUniform(n, low, high)

Parameters

 n - posint, number of samples low - realcons, lower bound of the uniform distribution range hi - realcons, upper bound of the uniform distribution range

Options

 • container : Array, predefined Array for holding results
 • seed : nonnegint, seed for the pseudo-random number generator

Description

 • The GenerateUniform(n, low, high) command generates n floating-point samples of a uniformly distributed pseudo-random signal with values between the values of low and high. The results are returned in an Array with datatype float[8].
 • If the container=C option is provided, then the results are put into C and C is returned. With this option, no additional memory is allocated to store the result. The container must be an Array of size n having datatype float[8].
 • If the seed option is provided, the given value is used as the seed for the pseudo-random number generator. Otherwise, a random nonnegative integer is used as the seed.

 • The SignalProcessing[GenerateUniform]  command is thread-safe as of Maple 17.

Examples

 > $\mathrm{with}\left(\mathrm{SignalProcessing}\right):$
 > $\mathrm{GenerateUniform}\left(10,-1,1\right)$
 $\left[\begin{array}{cccccccccc}{0.995867573674919}& {0.408337529411819}& {0.167610888327636}& {-0.246858837322246}& {0.432866472071836}& {-0.439979858216147}& {0.432901310269353}& {0.481379433115581}& {-0.477697063372826}& {0.0288390346482901}\end{array}\right]$ (1)
 > $c≔\mathrm{Array}\left(1..10,'\mathrm{datatype}'='\mathrm{float}'\left[8\right],'\mathrm{order}'='\mathrm{C_order}'\right):$
 > $\mathrm{GenerateUniform}\left(10,-1,1,'\mathrm{container}'=c\right)$
 $\left[\begin{array}{cccccccccc}{-0.545369867754208}& {-0.326116044725452}& {0.626373923819134}& {0.559925029969611}& {-0.373917395136553}& {-0.0919590264157885}& {0.819334052606265}& {-0.363816344712829}& {-0.439285152836273}& {0.797210991320126}\end{array}\right]$ (2)
 > $c$
 $\left[\begin{array}{cccccccccc}{-0.545369867754208}& {-0.326116044725452}& {0.626373923819134}& {0.559925029969611}& {-0.373917395136553}& {-0.0919590264157885}& {0.819334052606265}& {-0.363816344712829}& {-0.439285152836273}& {0.797210991320126}\end{array}\right]$ (3)
 > $\mathrm{SignalPlot}\left(c\right)$

Compatibility

 • The SignalProcessing[GenerateUniform]  command was introduced in Maple 17.
 • For more information on Maple 17 changes, see Updates in Maple 17.