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

Online Help

All Products    Maple    MapleSim


SignalProcessing

  

GenerateTriangle

  

generate a triangle

 

Calling Sequence

Parameters

Options

Description

Thread Safety

Examples

Compatibility

Calling Sequence

GenerateTriangle( n, magnitude, frequency, phase, asymmetry )

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)

asymmetry

-

realcons, the asymmetry of the signal (-Pi <= asymmetry < Pi)

Options

• 

container : Array, predefined Array for holding results

Description

• 

The GenerateTriangle(n, magnitude, frequency, phase, asymmetry ) command generates n samples for a triangular signal. The result is returned in an Array with datatype float[8].

• 

The value of the magnitude argument must be positive.

• 

The value of the frequency argument must be non-negative and strictly less than 12.

• 

The phase argument must be non-negative and strictly less than 2π.

• 

The asymmetry argument must be greater than or equal to π, and strictly less than π. When the value of asymmetry is equal to 0, the resulting triangle is symmetric.

• 

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[GenerateTriangle] command is thread-safe as of Maple 17.

• 

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

Examples

withSignalProcessing&colon;

GenerateTriangle10&comma;1&comma;1π&comma;π&comma;2.3

−0.154659252903654−0.8897381633598180.684501431689789−0.0505774787663751−0.7856563892225400.7885832058270680.0535042953709030−0.6815746150852620.8926649799643460.157586069508182

(1)

cArray1..10&comma;datatype=float8&comma;order=C_order&colon;

GenerateTriangle10&comma;1&comma;1π&comma;π&comma;2.3&comma;container=c

−0.154659252903654−0.8897381633598180.684501431689789−0.0505774787663751−0.7856563892225400.7885832058270680.0535042953709030−0.6815746150852620.8926649799643460.157586069508182

(2)

c

−0.154659252903654−0.8897381633598180.684501431689789−0.0505774787663751−0.7856563892225400.7885832058270680.0535042953709030−0.6815746150852620.8926649799643460.157586069508182

(3)

SignalPlotGenerateTriangle100&comma;1&comma;1π&comma;π&comma;2.3

Compatibility

• 

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

• 

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

See Also

GenerateSlope

GenerateTone

SignalPlot