HyperMath

Unwrap

Unwrap

Previous topic Next topic No expanding text in this topic  

Unwrap

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Unwraps a vector or matrix of phase values.

Syntax

Pnew = Unwrap(P, tol)

Pnew = Unwrap(P, tol, dim)

Pnew = Unwrap(P, [], dim)

Arguments

Name

Description

 

P

A vector or matrix of phase values in radians.

 

tol

(optional)

A positive scalar that is the tolerance in radians. Defaults to pi. It also defaults to pi when an empty matrix is used. See Comments.

 

dim

(optional)

The dimension on which to unwrap. To apply by column, set
dim = 1. To apply by row, dim = 2. If P is a matrix, dim defaults to 1. If P is a vector and dim is omitted, the vector is unwrapped regardless of its orientation.

Outputs

Name

Description

 

Pnew

A vector or matrix of unwrapped phase values. The same size as P.

Example 1

Unwrap the vector [2,6,4].

 

Syntax

 

pn = Unwrap([2,6,4])

 

Results

 

pn = 2  -0.28319  -2.2832

Comments

A phase value that differs by more than tol from the previous result value is modified by a multiple of 2*pi so that the difference is reduced to less than pi. A value of tol less than pi would not reduce differences that are already less than pi, so such values of tol are regarded as equal to pi.

See Also:

Phase

PhaseRes