# bode

Bode diagram.

## Syntax

bode(sys)

bode(sys, w)

bode(..., fmt, ...)

bode(..., property, value, ...)

[m, p, w] = bode(...)

## Inputs

sys
A linear time-invariant transfer function or state space system.
Type: class
w
A two-element vector containing the range of frequencies over which to compute the response. The units are radians/sec for continuous time, and Hz for discrete time.
Type: double
Dimension: vector
fmt
Plot format arguments. See the plot function help.
Type: string
Dimension: vector
property
Plot property arguments that are paired with a following value. See the plot function help.
Type: string
Dimension: vector
value
Plot property value arguments. See the plot function help.
Type: integer
Dimension: scalar

## Outputs

m
The magnitude response.
Type: double
Dimension: vector
p
The phase response.
Type: double
Dimension: vector
w
The vector of frequencies at which to compute the response. The units are radians/sec for continuous time, and Hz for discrete time. If w is a two-element vector, it contains the range of frequencies over which to compute the response. The units are radians/sec for continuous time, and Hz for discrete time.
Type: double
Dimension: vector

## Example

Create the Bode diagram of a 2nd order Chebyshev II low pass analog filter with a 100 radians/sec cutoff frequency and -20 db attenuation.

[b,a] = cheby2(2,20,100,'s');
tfo = tf(b,a);
bode(tfo);