A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://python-control.readthedocs.io/en/stable/generated/control.unwrap.html below:

Website Navigation


control.unwrap — Python Control Systems Library 0.10.2 documentation

control.unwrap
control.unwrap(angle, period=6.283185307179586)[source]

Unwrap a phase angle to give a continuous curve.

Parameters:
anglearray_like

Array of angles to be unwrapped.

periodfloat, optional

Period (defaults to 2 pi).

Returns:
angle_outndarray

Output array, with jumps of period/2 eliminated.

Examples

>>> # Already continuous
>>> theta1 = np.array([1.0, 1.5, 2.0, 2.5, 3.0]) * np.pi
>>> theta2 = ct.unwrap(theta1)
>>> theta2/np.pi                                            
array([1. , 1.5, 2. , 2.5, 3. ])
>>> # Wrapped, discontinuous
>>> theta1 = np.array([1.0, 1.5, 0.0, 0.5, 1.0]) * np.pi
>>> theta2 = ct.unwrap(theta1)
>>> theta2/np.pi                                            
array([1. , 1.5, 2. , 2.5, 3. ])

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4