Using the Simulation Data Inspector, you can view and inspect signal data from simulations or from imported data. The Simulation Data Inspector allows you to group data from multiple simulations on multiple plots, which gives you a comprehensive view of your data. You can also use data cursors in the plots for close examination of signal values.
These examples show you how to view and inspect signal data
using the Simulation Data Inspector using the
as an example.
In the MATLAB® Command Window, enter
open the model.
To stream signals
alpha, rad from the model to the Simulation
Data Inspector, select each signal, click the Simulation
Data Inspector button arrow, and select Stream
Selected Signals to Data Inspector.
The streaming badge appears above each signal marked for streaming.
Double-click the Pilot signal generator block. Set Wave
sine, and click OK.
In the Simulink® Editor, click the Simulation Data Inspector button to open the Simulation Data Inspector.
Simulate the model. A new run appears in the Simulation Data Inspector.
By default, the Runs pane contains a row for each signal, organized by simulation runs. You can expand or collapse any of the runs to view the signals in a run. For more information on signal grouping, see Customize the Simulation Data Inspector Interface.
To plot the signals, select the check box next to
rad signals. The signal data appears in the plot.
In the Simulation Data Inspector, you can inspect signal values at any point of the simulation using data cursors.
On the Visualize tab, click Data Cursors to add one data cursor to the plot.
Drag the data cursor left or right to a point of interest, or you can use the arrow keys to move the data cursor.
You can move a data cursor to a specific point without
dragging it. Click the data cursor time field and enter the time value
If an asterisk appears in the data cursor label, then it means the value is interpolated. The Simulation Data Inspector linearly interpolates the value if the signal was not sampled at a point of interest.
Click the Data Cursors arrow and select Hide.
You can use subplot layouts to group signals on different subplots. For example, you can group the same signal from different simulation runs, group signals with a similar range of values, or normalize a subset of your signal data.
In the model, double-click the Pilot signal generator
block. Set Wave form to
and click OK.
Simulate the model.
A new run appears in the Simulation Data Inspector.
In the Simulation Data Inspector, on the Visualize tab,
click Subplots and select
Click the middle subplot. In the Runs pane,
from Run 2, select the
alpha, rad signal check boxes.
The signal check boxes show the signals that are plotted in the selected subplot, which is outlined in blue.
Select the signal you want to move.
Drag the signal to the plot you want to move it to.
For more information on working with plots, see Modify a Plot in the Simulation Data Inspector.
Subplots are linked together by default so that plots stay in sync when you pan and zoom. These operations synchronize across linked plots:
Pan by clicking on the plot and dragging
Zoom in, zoom out, zoom on the time axis, and zoom on the Y-axis
Fit data to view
To pan and zoom independently in a subplot, unlink the subplot.
Select the subplot you want to unlink.
On the Format tab, click the Unlink a Subplot button on.
The broken link symbol appears on the unlinked subplot.
To help search through a large amount of data in the Runs and Comparisons panes, you can filter runs and signals by text contained in the run or signal name and properties. The properties are also found in the Runs and Comparisons pane columns.
To show signals only with the name
alpha into the Filter Signals text box. The
matches are highlighted in the filter results.
To filter for a signal or run property, you can use
colons. For example,
port:1 filters for signals
that use port 1 in the model. Since the column is not visible in the Runs pane,
the result is not highlighted.
To save multiple filter terms to a filter name, open the Advanced section of the filter dialog box.
Select a column filter criteria, and enter the filter value. This example uses the Run and Block Name columns as filter criteria.
The filter matches text. For example, if you want to filter
for absolute tolerance values of
To save the filter, enter a name in the Save Search As box. Click Save.
The saved filter shows in the filter list.
You can visualize and inspect event-based data in the Simulation Data Inspector with stem plots. To visualize event-based or message data, mark the signal for streaming. When you simulate the model, the data appears in the Simulation Data Inspector as a stem plot for each event.