generate a slope array - Maple Help

# Online Help

###### All Products    Maple    MapleSim

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

SignalProcessing[GenerateSlope] - generate a slope array

 Calling Sequence GenerateSlope(n, offset, slope)

Parameters

 n - posint, number of samples offset - realcons, offset slope - realcons, slope

Description

 • The GenerateSlope(n, offset, slope) command generates n samples for a slope signal. The result is returned in an Array with datatype float[8].
 • The $k$-th sample point is computed as $km+\mathrm{\alpha }$, where $\mathrm{\alpha }$ is the value of offset and $m$ is the value of the slope argument.
 • 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].

Thread Safety

 • The SignalProcessing[GenerateSlope] command is thread-safe as of Maple 17.
 • For more information on thread safety, see index/threadsafe.

Examples

 > $\mathrm{with}\left(\mathrm{SignalProcessing}\right):$
 > $A:=\mathrm{GenerateSlope}\left(10,0,1\right)$
 ${A}{:=}\left[\begin{array}{cccccccccc}{0.}& {1.}& {2.}& {3.}& {4.}& {5.}& {6.}& {7.}& {8.}& {9.}\end{array}\right]$ (1)
 > $c:=\mathrm{Array}\left(1..10,'\mathrm{datatype}'={'\mathrm{float}'}_{8},'\mathrm{order}'='\mathrm{C_order}'\right):$
 > $A:=\mathrm{GenerateSlope}\left(10,1.3,-0.35,'\mathrm{container}'=c\right)$
 ${A}{:=}\left[\begin{array}{cccccccccc}{1.30000000000000}& {0.950000000000000}& {0.600000000000000}& {0.250000000000000}& {-}{0.0999999999999999}& {-}{0.450000000000000}& {-}{0.800000000000000}& {-}{1.15000000000000}& {-}{1.50000000000000}& {-}{1.85000000000000}\end{array}\right]$ (2)
 > $c$
 $\left[\begin{array}{cccccccccc}{1.30000000000000}& {0.950000000000000}& {0.600000000000000}& {0.250000000000000}& {-}{0.0999999999999999}& {-}{0.450000000000000}& {-}{0.800000000000000}& {-}{1.15000000000000}& {-}{1.50000000000000}& {-}{1.85000000000000}\end{array}\right]$ (3)
 > $\mathrm{plots}:-\mathrm{listplot}\left(\mathrm{GenerateSlope}\left(100,1.3,-0.35\right)\right)$
 See Also

## Was this information helpful?

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