generate a tone - Maple Help

Online Help

All Products    Maple    MapleSim


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)

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

withSignalProcessing&colon;

GenerateTone10&comma;1&comma;1&pi;&comma;&pi;

1.0.4161468364414230.6536436213500370.9601702863236700.1455000321309770.8390715302853520.8438539572576530.1367372214521730.9576594814178690.660316704993774

(1)

c:=Array1..10&comma;&apos;datatype&apos;&equals;&apos;float&apos;8&comma;&apos;order&apos;&equals;&apos;C_order&apos;&colon;

GenerateTone10&comma;1&comma;1&pi;&comma;&pi;&comma;&apos;container&apos;&equals;c

1.0.4161468364414230.6536436213500370.9601702863236700.1455000321309770.8390715302853520.8438539572576530.1367372214521730.9576594814178690.660316704993774

(2)

c

1.0.4161468364414230.6536436213500370.9601702863236700.1455000321309770.8390715302853520.8438539572576530.1367372214521730.9576594814178690.660316704993774

(3)

plots:-listplotGenerateTone100&comma;1&comma;1&pi;&comma;&pi;

See Also

Array, GenerateSlope, GenerateTriangle, plots[listplot], with


Download Help Document

Was this information helpful?



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