control.matlab.unwrap

control.matlab.unwrap(angle, period=6.283185307179586)

Unwrap a phase angle to give a continuous curve

Parameters
  • angle (array_like) – Array of angles to be unwrapped

  • period (float, optional) – Period (defaults to 2*pi)

Returns

angle_out – Output array, with jumps of period/2 eliminated

Return type

array_like

Examples

>>> import numpy as np
>>> theta = [5.74, 5.97, 6.19, 0.13, 0.35, 0.57]
>>> unwrap(theta, period=2 * np.pi)
[5.74, 5.97, 6.19, 6.413185307179586, 6.633185307179586, 6.8531853071795865]