iddataPlotOptions

Options set for iddata/plot

Syntax

  • opt = iddataPlotOptions('time') example
  • opt = iddataPlotOptions('frequency') example
  • opt = iddataPlotOptions(___,'identpref') example

Description

example

opt = iddataPlotOptions('time') creates a default options set for plotting time-domain data. Use these options to customize the data plot.

example

opt = iddataPlotOptions('frequency') creates a default options set for plotting frequency-domain data.

example

opt = iddataPlotOptions(___,'identpref') initializes the plot options with the System Identification Toolbox™ preferences. This syntax can include any of the input argument combinations in the previous syntaxes.

Examples

expand all

Create Options Set for Plotting Time-Domain Data

Create an options set and use it for plotting time-domain data.

Create an options set with default options for time-domain data.

opt = iddataPlotOptions('time');

Specify plot properties, such as time units and grid. View the plot in minutes

 opt.TimeUnits = 'minutes';
 % Turn grid on
 opt.Grid = 'on';

Create a plot using the specified options.

load iddata1 z1
h = plot(z1, opt);

Create Options Set for Plotting Frequency-Domain Data

Create an options set and use it for plotting frequency-domain data.

Create an options set with default options for frequency-domain data.

opt = iddataPlotOptions('frequency');

Specify plot properties, such as phase visibility and frequency units.

opt.PhaseVisible = 'off';
opt.FreqUnits = 'Hz';

Create a plot with the specified options.

load iddata7 z7
zf = fft(z7);
h = plot(zf, opt);

Initialize a Plot Using Toolbox Preferences

opt = iddataPlotOptions('time','identpref');

Output Arguments

expand all

opt — Options set for iddata/plotiddataPlotOptions options set

Options set containing the specified options for iddata/plot. The structure has the following fields:

Field Description
Title, XLabel, YLabel

Axes label and title, specified as a string.

TickLabelTick label, specified as a string
GridShow or hide the grid
Specified as one of the following strings: 'off' | 'on'
Default: 'off'
XlimMode, YlimModeLimit modes, specified as one of the following strings:
  • 'auto' — The axis limits are based on the data plotted

  • 'manual' — The values explicitly set with Xlim, Ylim

Default: 'auto'
Xlim, YlimAxes limits, specified as maximum and minimum values.
Default: [0 1].
IOGroupingGrouping of input-output pairs
Specified as one of the following strings: 'none' |'inputs'|'output'|'all'
Default: 'none'
InputLabels, OutputLabels

Input and output label styles on individual plot axes.

InputVisible, OutputVisibleVisibility of input and output channels
Specified as one of the following strings: 'off' | 'on'
Default: 'on'
For time-domain data plots only:
FieldDescription
TimeUnitsTime units, specified as one of the following strings:
  • 'nanoseconds'

  • 'microseconds'

  • 'milliseconds'

  • 'seconds'

  • 'minutes'

  • 'hours'

  • 'days'

  • 'weeks'

  • 'months'

  • 'years'

You can also specify 'auto' which uses time units specified in the TimeUnit property of the data. For multiple systems with different time units, the units of the first system is used.

NormalizeNormalize responses.
Specified as one of the following strings: 'on' |'off'
Default: 'off'

For frequency-domain data plots only:
FieldDescription
FreqUnits

Frequency units, specified as one of the following strings:

  • 'Hz'

  • 'rad/second'

  • 'rpm'

  • 'kHz'

  • 'MHz'

  • 'GHz'

  • 'rad/nanosecond'

  • 'rad/microsecond'

  • 'rad/millisecond'

  • 'rad/minute'

  • 'rad/hour'

  • 'rad/day'

  • 'rad/week'

  • 'rad/month'

  • 'rad/year'

  • 'cycles/nanosecond'

  • 'cycles/microsecond'

  • 'cycles/millisecond'

  • 'cycles/hour'

  • 'cycles/day'

  • 'cycles/week'

  • 'cycles/month'

  • 'cycles/year'

Default: 'rad/s'

You can also specify 'auto' which uses frequency units rad/TimeUnit relative to system time units specified in the TimeUnit property. For multiple systems with different time units, the units of the first system are used.

FreqScaleFrequency scale, specified as one of the following strings: 'linear' | 'log'
Default: 'log'
MagUnitsMagnitude units, specified as one of the following strings: 'dB' | 'abs'
Default: 'dB'
MagScaleMagnitude scale, specified as one of the following strings: 'linear' | 'log'
Default: 'linear'
MagVisibleMagnitude plot visibility, specified as one of the following strings: 'on' | 'off'
Default: 'on'
MagLowerLimModeEnables a lower magnitude limit, specified as one of the following strings: 'auto' | 'manual'
Default: 'auto'
MagLowerLimLower magnitude limit, specified as a double typically decided by the range of the amplitudes the plotted data takes.
PhaseUnitsPhase units, specified as one of the following strings: 'deg' | 'rad'
Default: 'deg'
PhaseVisiblePhase plot visibility, specified as one of the following strings: 'on' | 'off'
Default: 'on'
PhaseWrappingEnables phase wrapping, specified as one of the following strings: 'on' | 'off'
Default: 'off'
PhaseMatchingEnables phase matching, specified as one of the following strings: 'on' | 'off'
Default: 'off'
PhaseMatchingFreqFrequency for matching phase. The value depends on the frequency vector of the plotted data. You pick one of the those values and the plotted match is matched at that value for all plotted datasets.
PhaseMatchingValueThe value to which phase responses are matched closely, specified as a real number representing the desired phase value PhaseMatchingFreq.

Was this topic helpful?