Main Content

Plot Bode frequency response with additional plot customization options

`bodeplot`

lets you plot the Bode magnitude and phase of a
dynamic system model with a broader range of plot customization options than
`bode`

. You can use `bodeplot`

to obtain the plot handle
and use it to customize the plot, such as modify the axes labels, limits and units. You can
also use `bodeplot`

to draw a Bode response plot on an existing set of axes
represented by an axes handle. To customize an existing Bode plot using the plot
handle:

Obtain the plot handle

Use

`getoptions`

to obtain the option setUpdate the plot using

`setoptions`

to modify the required options

For more information, see Customizing Response Plots from the Command Line (Control System Toolbox). To create Bode plots with default options or to
extract the frequency response data, use `bode`

.

plots
the Bode magnitude and phase of the dynamic system
model
`h`

= bodeplot(`sys`

)`sys`

and returns the plot handle `h`

to the plot. You
can use this handle `h`

to customize the plot with the `getoptions`

and `setoptions`

commands. If `sys`

is a multi-input,
multi-output (MIMO) model, then `bodeplot`

produces a grid of Bode plots,
each plot displaying the frequency response of one I/O pair.

plots the Bode frequency response with the options set specified in
`h`

= bodeplot(___,`plotoptions`

)`plotoptions`

. You can use these options to customize the Bode plot
appearance using the command line. Settings you specify in `plotoptions`

overrides the preference settings in the MATLAB^{®} session in which you run `bodeplot`

. Therefore, this syntax
is useful when you want to write a script to generate multiple plots that look the same
regardless of the local preferences.

plots system responses for frequencies specified by the frequencies in
`h`

= bodeplot(___,`w`

)`w`

.

If

`w`

is a cell array of the form`{wmin,wmax}`

, then`bodeplot`

plots the response at frequencies ranging between`wmin`

and`wmax`

.If

`w`

is a vector of frequencies, then`bodeplot`

plots the response at each specified frequency.

You can use `w`

with any of the input-argument combinations in
previous syntaxes.

See `logspace`

to generate logarithmically spaced
frequency vectors.

`bode`

| `bodeoptions`

| `getoptions`

| `setoptions`

| `showConfidence`

- Customizing Response Plots from the Command Line (Control System Toolbox)