Learn R Programming

signal (version 0.5)

unwrap: Unwrap radian phases

Description

Unwrap radian phases by adding multiples of 2*pi as appropriate to remove jumps.

Usage

unwrap(a, tol = pi, dim = 1)

Arguments

a
vector of phase angles in radians.
tol
tolerance for removing phase jumps.
dim
dimension with which to apply the phase unwrapping.

Value

  • A vector with the unwrapped phase angles.

References

Octave Forge http://octave.sf.net

Examples

Run this code
phase = c(linspace(0,2*pi), linspace(0, 2*pi))
plot(phase, type = "l", ylim = c(0, 4*pi))
lines(unwrap(phase), col = "blue")

Run the code above in your browser using DataLab