unwrap: Unwrap radian phases

Description Usage Arguments Value Author(s) References Examples

View source: R/unwrap.R

Description

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

Usage

1
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.

Author(s)

Original Octave version by Bill Lash. Conversion to R by Tom Short.

References

Octave Forge https://octave.sourceforge.io/

Examples

1
2
3
phase <- c(seq(0, 2*pi, length=500), seq(0, 2*pi, length=500))
plot(phase, type = "l", ylim = c(0, 4*pi))
lines(unwrap(phase), col = "blue")

Example output

Attaching package: 'signal'

The following objects are masked from 'package:stats':

    filter, poly

signal documentation built on May 25, 2021, 9:06 a.m.

Related to unwrap in signal...