idplot
Syntax
Description
Plot Data
idplot( plots the input and output
channels of the data data)data. data can be a
timetable, a comma-separated matrix pair, a single matrix, or an iddata object.
The function plots the outputs on the top axes and the inputs on the bottom axes. When
data is a timetable, the software assumes that the last variable is
the sole output channel and that the remaining variables are the input channels. If you
have data that does not fit this pattern, specify the channels using the
InputName and OutputName name-value
arguments.
For time-domain data, the input and output signals are plotted as a function of time. The specification for the input intersample behavior (
InputInterSampleoption indataPlotOptionswhendatais a timetable or numeric matrix pair,data.InterSamplewhendatais aniddata object) determines whether the input signals are plotted as linearly interpolated curves or as staircase plots. For example, ifdata.InterSample = 'zoh', the input is piecewise constant between sampling points, and is plotted accordingly.For frequency-domain data, the magnitude and phase of each input and output signal are plotted over the available frequency span.
To plot a subset of the data, use subreferencing:
idplot(data(201:300,:))plots all the variables in the samples 201 to 300 in the timetable objectdata.idplot(udata(201:300,:),ydata(201:300,:))plots the samples 201 to 300 in the matrix pairdata.idplot(data(201:300))plots the samples 201 to 300 in theiddataobjectdata.idplot(data(201:300,'Altitude',{'Angle_of_attack','Speed'}))plots the specified samples of the output namedAltitudeand the inputs namedAngle_of_attackandSpeed.idplot(data(:,[3 4],[3:7]))plots all samples of output channel numbers 3 and 4 and input numbers 3 through 7.
idplot(data1,...,dataN) plots multiple datasets. The number of
plot axes is determined by the number of unique input and output names among all the
datasets.
idplot(data1,LineSpec1...,dataN,LineSpecN) specifies the line
style, marker type, and color for each dataset. You can specify options for only some data
sets. For example, idplot(data1,data2,'k',data3) specifies black as the
plot color for data2.
Use Plot Handle to Specify Axes
idplot( plots
into the axes with the handle axes_handle,___)axes_handle instead of into the current
axes (gca). Use this syntax with any of the input argument
combinations in the previous syntaxes.
Specify Additional Model Options
incorporates additional options specified by one or more name-value arguments.sys = idplot(___,Name,Value)
For example, specify output and input channels using the name-value arguments
OutputName and InputName. Use this syntax when
data is a timetable and does not follow the default software
interpretation of the last variable being the sole output channel and all other channels
being input channels.
If you specify 'OutputName' and all the other variables in
data are input channels, you do not need to specify
'InputName'.
Specify Plot Options
idplot(___,
specifies the plot options.plotoptions)
Return Plot Handle
returns the
handle to the plot. You can use this handle to customize the plot with h = idplot(___)getoptions and
setoptions.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Tips
Right-clicking the plot opens the context menu, where you can access the following options and plot controls.
| Option | Description and Suboptions |
|---|---|
| Datasets | View the datasets used in the plot. |
| Characteristics | Peak Value — View the peak value of the data. This value is useful for transient data. Mean Value — View the mean value of the data. This value is useful for steady-state data. |
| Orientation | For data with one input and one output channel:
For data with more than one input or output channel:
|
| I/O Grouping | Group input and output channels on the plot. Use this option with datasets with more than one input or output channel. |
| I/O Selector | Select a subset of the input and output channels to plot. By default, all input and output channels are plotted. Use this option with data sets with more than one input or output channel. |
| Grid | Add grids to your plot. |
| Normalize | Normalize the y-scale of all data in the plot. |
| Properties | Open the Property Editor dialog box, where you can customize plot attributes. |




![Figure contains 2 axes objects. Axes object 1 with title y1 contains an object of type line. This object represents [umat1,ymat1]. Axes object 2 with title u1 contains an object of type line. This object represents [umat1,ymat1].](../../examples/ident/win64/PlotInputDataOutputDataAndInputOutputDataExample_03.png)



![Figure contains 2 axes objects. Axes object 1 with title y1 contains 2 objects of type line. These objects represent [umat1,ymat1], [umat2,ymat2]. Axes object 2 with title u1 contains 2 objects of type line. These objects represent [umat1,ymat1], [umat2,ymat2].](../../examples/ident/win64/PlotMultipleDatasetsExample_03.png)






![Figure contains 2 axes objects. Axes object 1 with title y1 contains 2 objects of type line. These objects represent [umat1,ymat1], [umat2,ymat2]. Axes object 2 with title u1 contains 2 objects of type line. These objects represent [umat1,ymat1], [umat2,ymat2].](../../examples/ident/win64/SpecifyLineStyleMarkerSymbolAndColorExample_01.png)





![Figure contains 2 axes objects. Axes object 1 with title y1 contains an object of type line. This object represents [umat1,ymat1]. Axes object 2 with title u1 contains an object of type line. This object represents [umat1,ymat1].](../../examples/ident/win64/SpecifyPlotOptionsExample_01.png)



