GenerateTone - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

SignalProcessing

  

GenerateTone

  

generate a tone

 

Calling Sequence

Parameters

Options

Description

Thread Safety

Examples

Compatibility

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 relative to the sampling frequency; with value 0 <= frequency < 1/2 (Nyquist sampling frequency)

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].

Thread Safety

• 

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

• 

For more information on thread safety, see index/threadsafe.

Examples

(1)

The container option can be used to put generated values into a predefined Array.

(2)

(3)

 

A plot of the signal vs the index position (note that this is not equal to time):

To plot the signal vs time, the sampling rate and signal frequency are required:

Compatibility

• 

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

• 

For more information on Maple 17 changes, see Updates in Maple 17.

See Also

GenerateSlope

GenerateTriangle

SignalPlot

 


Download Help Document