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

Online Help

All Products    Maple    MapleSim


SignalProcessing

  

Magnitude

  

compute the element-wise complex magnitude of an array of samples

 

Calling Sequence

Parameters

Options

Description

Thread Safety

Examples

Compatibility

Calling Sequence

Magnitude(A)

Magnitude(Br, Bi)

Parameters

A

-

Array of complex numeric values; the signal

Br, Bi

-

Arrays of real numeric values corresponding to the real and imaginary parts of the signal

Options

• 

container : Array, predefined Array for holding result

Description

• 

The Magnitude(A) command computes the element-wise complex magnitude (absolute value) of the Array A and returns the result in an Array of datatype float[8].

• 

The Magnitude(Br, Bi) command computes the element-wise complex magnitude of the complex numbers whose real and imaginary parts are stored separately in the Arrays Br and Bi and returns the result in an Array of datatype float[8].

• 

Before the code performing the computation runs, the input Array(s) are converted to datatype complex[8] (for the calling sequence with A) or float[8] (for the calling sequence with Br and Bi) if they do not have that datatype already. For this reason, it is most efficient if the input Array(s) have this datatype beforehand.

• 

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 having datatype float[8] and the same size as A, Br or Bi.

Thread Safety

• 

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

• 

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

Examples

withSignalProcessing:

aArray1.+I,2.3.I,4.,1.I,datatype=complex8

a1.+I2.3.I4.+0.I0.I

(1)

Magnitudea

1.414213562373093.605551275463994.1.

(2)

cArray1..numelemsa,datatype=float8:

Magnitudea,container=c

1.414213562373093.605551275463994.1.

(3)

c

1.414213562373093.605551275463994.1.

(4)

rArray1.,2.,4.,0.,datatype=float8

r1.2.4.0.

(5)

iArray1.,3.,0.,1.,datatype=float8

i1.−3.0.−1.

(6)

Magnituder,i

1.414213562373103.605551275463994.1.

(7)

Magnituder,i,container=c

1.414213562373103.605551275463994.1.

(8)

c

1.414213562373103.605551275463994.1.

(9)

mArray1..2,1..2,1.+I,2.I,3.+2.,4.+2I,datatype=complex8

m1.+I2.I−1.+0.I−4.+2.I

(10)

Magnitudem

1.414213562373092.236067977499791.4.47213595499958

(11)

nArray1..2,1..2,datatype=float8:

Magnitudem,container=n

1.414213562373092.236067977499791.4.47213595499958

(12)

n

1.414213562373092.236067977499791.4.47213595499958

(13)

Compatibility

• 

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

• 

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

See Also

SignalProcessing[Phase]