bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / signal / _ltisys / dlti / bode
function
scipy.signal._ltisys:dlti.bode
source: build-install/usr/lib/python3.14/site-packages/scipy/signal/_ltisys.py:645
Signature
def bode(self, w = None, n = 100)Summary
Calculate Bode magnitude and phase data of a discrete-time system.
Parameters
w: array_like, optionalArray of frequencies normalized to the Nyquist frequency being π, i.e., having unit radiant / sample. Magnitude and phase data is calculated for every value in this array. If not given, a reasonable set will be calculated.
n: int, optionalNumber of frequency points to compute if
wis not given. Thenfrequencies are logarithmically spaced in an interval chosen to include the influence of the poles and zeros of the system. Defaults to 100.
Returns
w: 1D ndarrayArray of frequencies normalized to the Nyquist frequency being
np.pi/dtwithdtbeing the sampling interval of thesystemparameter. The unit is rad/s assumingdtis in seconds.mag: 1D ndarrayMagnitude array in dB
phase: 1D ndarrayPhase array in degrees
Examples
from scipy import signal import matplotlib.pyplot as plt✓
sys = signal.TransferFunction([1], [1, 2, 3], dt=0.5)
✓w, mag, phase = sys.bode()
✓plt.figure() plt.semilogx(w, mag) # Bode magnitude plot plt.figure() plt.semilogx(w, phase) # Bode phase plot✗
[<matplotlib.lines.Line2D object at 0x7f3f43ad5160>]
plt.show()
✓

See also
- dbode
Bode plot data for discrete-time LTI systems.
Aliases
scipy.signal.dlti.bode