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

Online Help

All Products    Maple    MapleSim


SignalProcessing

  

Phase

  

compute the element-wise complex phase (angle) of an array of samples

 

Calling Sequence

Parameters

Options

Description

Thread Safety

Examples

Compatibility

Calling Sequence

Phase( A, options )

Phase( Br, Bi, options )

Parameters

A

-

Array of complex numeric values; the signal

Br, Bi

-

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

Options

• 

container : (optional) Array, predefined Array for holding result

• 

unwrap : (optional) truefalse, determines if the phases are unwrapped; default is false

Description

• 

The Phase(A) command computes the element-wise phase of the Array A and returns the result in an Array of datatype float[8].

• 

The Phase(Br, Bi) command computes the element-wise phase 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 this 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.

• 

If unwrap=true, then the phases are modified by adding integer multiples of 2*Pi, to ensure that the difference between consecutive elements in the result is less than Pi.

Thread Safety

• 

The SignalProcessing[Phase] 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)

Phasea

0.785398163397448−0.9827937232473290.−1.57079632679490

(2)

cArray1..numelemsa,datatype=float8:

Phasea,container=c

0.785398163397448−0.9827937232473290.−1.57079632679490

(3)

c

0.785398163397448−0.9827937232473290.−1.57079632679490

(4)

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

r1.2.4.0.

(5)

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

i1.−3.0.−1.

(6)

Phaser,i

0.785398163397448−0.9827937232473290.−1.57079632679490

(7)

Phaser,i,container=c

0.785398163397448−0.9827937232473290.−1.57079632679490

(8)

c

0.785398163397448−0.9827937232473290.−1.57079632679490

(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)

Phasem

0.785398163397448−0.4636476090008063.141592653589792.67794504458899

(11)

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

Phasem,container=n

0.785398163397448−0.4636476090008063.141592653589792.67794504458899

(12)

n

0.785398163397448−0.4636476090008063.141592653589792.67794504458899

(13)

VVector5,1+I,3I,datatype=complex8

V5.+0.I−1.+I0.3.I

(14)

PPhaseV,unwrap=false

P0.2.35619449019234−1.57079632679490

(15)

QPhaseV,unwrap=true

Q0.2.356194490192344.71238898038469

(16)

Compatibility

• 

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

• 

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

• 

The SignalProcessing[Phase] command was updated in Maple 2021.

• 

The unwrap option was updated in Maple 2021.

See Also

SignalProcessing[Magnitude]