SignalProcessing - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Signal Processing : Signal Generation : SignalProcessing/GenerateUniform

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.
 • 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.
 • 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.785218492150308}& {0.588413964957000}& {-0.993165822699668}& {0.921578288543971}& {-0.0387801709584892}& {0.0136057925410569}& {-0.210756972897798}& {0.749600215815009}& {0.138966357801110}& {0.212285134010017}\end{array}\right]$ (1)
 > $c≔\mathrm{Array}\left(1..10,'\mathrm{datatype}'={'\mathrm{float}'}_{8},'\mathrm{order}'='\mathrm{C_order}'\right):$
 > $\mathrm{GenerateUniform}\left(10,-1,1,'\mathrm{container}'=c\right)$
 $\left[\begin{array}{cccccccccc}{0.338366801850498}& {-0.991120660211892}& {0.488912846427412}& {0.218458360992372}& {-0.977166885510089}& {-0.171592804603279}& {-0.446023768279702}& {-0.497211667243392}& {0.0888981595635416}& {-0.799259962048383}\end{array}\right]$ (2)
 > $c$
 $\left[\begin{array}{cccccccccc}{0.338366801850498}& {-0.991120660211892}& {0.488912846427412}& {0.218458360992372}& {-0.977166885510089}& {-0.171592804603279}& {-0.446023768279702}& {-0.497211667243392}& {0.0888981595635416}& {-0.799259962048383}\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.