SignalProcessing - Maple Programming Help

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

SignalProcessing

 GenerateTone
 generate a tone

 Calling Sequence GenerateTone( n, magnitude, frequency, phase )

Parameters

 n - posint, number of samples to generate magnitude - realcons, magnitude of the signal frequency - realcons, the frequency of the signal (0 <= frequency < 1/2) phase - realcons, the phase of the signal (0 <= phase < 2Pi)

Options

 • container : Array, predefined Array for holding results

Description

 • The GenerateTone(n, magnitude, frequency, phase ) command generates n samples for a tone (sinusoidal) signal with the indicated values for the magnitude, frequency and phase. The result is 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].

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

Examples

 > $\mathrm{with}\left(\mathrm{SignalProcessing}\right):$
 > $\mathrm{GenerateTone}\left(10,1,\frac{1}{\mathrm{π}},\mathrm{π}\right)$
 $\left[\begin{array}{cccccccccc}{-}{1.}& {0.416146836441423}& {0.653643621350037}& {-}{0.960170286323670}& {0.145500032130977}& {0.839071530285352}& {-}{0.843853957257653}& {-}{0.136737221452173}& {0.957659481417869}& {-}{0.660316704993774}\end{array}\right]$ (1)
 > $c≔\mathrm{Array}\left(1..10,'\mathrm{datatype}'={'\mathrm{float}'}_{8},'\mathrm{order}'='\mathrm{C_order}'\right):$
 > $\mathrm{GenerateTone}\left(10,1,\frac{1}{\mathrm{π}},\mathrm{π},'\mathrm{container}'=c\right)$
 $\left[\begin{array}{cccccccccc}{-}{1.}& {0.416146836441423}& {0.653643621350037}& {-}{0.960170286323670}& {0.145500032130977}& {0.839071530285352}& {-}{0.843853957257653}& {-}{0.136737221452173}& {0.957659481417869}& {-}{0.660316704993774}\end{array}\right]$ (2)
 > $c$
 $\left[\begin{array}{cccccccccc}{-}{1.}& {0.416146836441423}& {0.653643621350037}& {-}{0.960170286323670}& {0.145500032130977}& {0.839071530285352}& {-}{0.843853957257653}& {-}{0.136737221452173}& {0.957659481417869}& {-}{0.660316704993774}\end{array}\right]$ (3)
 > $\mathrm{plots}:-\mathrm{listplot}\left(\mathrm{GenerateTone}\left(100,1,\frac{1}{\mathrm{π}},\mathrm{π}\right)\right)$

Compatibility

 • The SignalProcessing[GenerateTone] command was introduced in Maple 17.