unwrap

Unwrap a vector of phase angles.

Syntax

u = unwrap(p)

u = unwrap(p,tol)

u = unwrap(p,tol,dim)

Inputs

p
A vector or matrix of phase angles in radians.
Type: double
Dimension: vector | matrix
tol
A scalar threshold that sets the maximum step between adjacent angles in radians. Steps larger than tol are reduced to less than tol by adding or subtracting multiples of 2*pi. The default is pi, and smaller values are treated as pi.
Type: double
Dimension: scalar
dim
Dimension on which to perform the calculation.
(default: first non-singular dimension).
Type: integer
Dimension: scalar

Outputs

y
The vector of unwrapped phase ngles.

Example

p = tan(-3:0.5:3)
u = unwrap(p)
p = [Matrix] 1 x 13
0.14255  0.74702  2.18504  -14.10142  -1.55741  -0.54630  0.00000  0.54630
1.55741  14.10142  -2.18504  -0.74702  -0.14255
u = [Matrix] 1 x 13
0.14255  0.74702  2.18504  4.74814  4.72578  5.73688  6.28319  6.82949  7.84059
7.81823  10.38133  11.81935  12.42382