Main Content

getoptions

(Not recommended) Get options for linear analysis plot object

getoptions is not recommended. Set plot options by accessing chart object properties using dot notation. For more information, see Version History.

getoptions is still recommended for idplot and spectrumplot. For more information, see getoptions (System Identification Toolbox).

Description

opts = getoptions(plotobj) returns the options for the plot associated with linear analysis chart object plotobj.

  • You can use opts when creating new plots of the same type as plotobj.

  • To customize an existing plot, you can modify opts and then use the resulting options object with setoptions.

example

optValue = getoptions(plotobj,option) returns the specified option, option, for the plot associated with chart object plotobj.

Examples

collapse all

For this example, consider a MIMO state-space model with 3 inputs, 3 outputs and 3 states. Create an impulse plot with red colored grid lines.

Create the MIMO state-space model sys_mimo.

J = [8 -3 -3; -3 8 -3; -3 -3 8];
F = 0.2*eye(3);
A = -J\F;
B = inv(J);
C = eye(3);
D = 0;
sys_mimo = ss(A,B,C,D);
size(sys_mimo)

Create an impulse plot with plot handle h and use getoptions for a list of the options available.

h = impulseplot(sys_mimo)
p = getoptions(h)

Use setoptions to update the plot with the required customization.

setoptions(h,'Grid','on','GridColor',[1 0 0]);

The impulse plot automatically updates when you call setoptions. For MIMO models, impulseplot produces a grid of plots, each plot displaying the impulse response of one I/O pair.

Input Arguments

collapse all

Plot, specified as one of the following chart objects.

Chart ObjectDescription
impulseplotImpulse response
initialplotInitial condition response
lsimplotSimulated time response to arbitrary inputs
stepplotStep plot
bodeplotFrequency response plot
nicholsplotNichols plot
nyquistplotNyquist plot
sigmaplotSingular value plot
pzplotImpulse plot
iopzplotPole-zero map for input-output pairs
rlocusplotRoot locus plot
hsvplotHankel singular values plot

Option name, specified as a string or character vector. To see the supported options for a specific plot type, see the corresponding option object page indicated in opts.

Output Arguments

collapse all

Plot options, returned as one of the following plot option objects depending on the chart object specified in plotobj.

Option value, returned as a scalar, vector, character vector, logical value, structure, or cell array depending on the option specified in option.

Alternative Functionality

You can also obtain property values of linear analysis plot objects using dot notation. For example, obtain the phase units for a Bode plot.

bp = bodeplot(sys);
phaseUnits = bp.PhaseUnits;

Version History

Introduced before R2006a

expand all