Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

setoptions

Set plot options for response plot

Syntax

setoptions(h, PlotOpts)
setoptions(h, 'Property1', 'value1', ...)
setoptions(h, PlotOpts, 'Property1', 'value1', ...)

Description

setoptions(h, PlotOpts) sets preferences for response plot using the plot handle. h is the plot handle, PlotOpts is a plot options handle containing information about plot options.

There are two ways to create a plot options handle:

  • Use getoptions, which accepts a plot handle and returns a plot options handle.

    p = getoptions(h)
    
  • Create a default plot options handle using one of the following commands:

    • bodeoptions — Bode plots

    • hsvoptions — Hankel singular values plots

    • nicholsoptions — Nichols plots

    • nyquistoptions — Nyquist plots

    • pzoptions — Pole/zero plots

    • sigmaoptions — Sigma plots

    • timeoptions — Time plots (step, initial, impulse, etc.)

    For example,

    p = bodeoptions
    

    returns a plot options handle for Bode plots.

setoptions(h, 'Property1', 'value1', ...) assigns values to property pairs instead of using PlotOpts. To find out what properties and values are available for a particular plot, type help <function>options. For example, for Bode plots type

help bodeoptions

For a list of the properties and values available for each plot type, see Properties and Values Reference (Control System Toolbox).

setoptions(h, PlotOpts, 'Property1', 'value1', ...) first assigns plot properties as defined in @PlotOptions, and then overrides any properties governed by the specified property/value pairs.

Examples

collapse all

Create the following continuous-time transfer function:

$$H(s) = {{1} \over {s + 1}}$$

sys = tf(1,[1 1]);

Create a Bode plot with plot handle h.

h = bodeplot(sys);

Create a plot options handle p.

p = getoptions(h);

Change frequency units of the plot to Hz.

p.FreqUnits = 'Hz';

Apply the plot options to the Bode plot.

setoptions(h,p);

Alternativey, use setoptions(h,'FrequencyUnits','Hz').

See Also

Introduced in R2012a

Was this topic helpful?