Using the Simulation Data Inspector, you can view and inspect signals from simulations or from imported data. The Simulation Data Inspector provides a comprehensive view of your data by allowing you to group data from multiple simulations on multiple plots. You can also use data cursors for close examination of signal values.
These examples show you how to view and inspect signal data
using the Simulation Data Inspector using the
This example uses signal logging to send data to the Simulation Data Inspector. You can also record logged simulation data or import signal data from the base workspace or a MAT-file. For more information, seeRecord Data with the Simulation Data Inspector and Import Data .
To open the model, enter
the MATLAB® Command Window.
alpha, rad to the Simulation Data Inspector,
select each signal in the model. Then, click the Simulation
Data Inspector drop-down, and select Log
The logging badge appears above each signal marked for logging.
Double-click the Pilot block. Set Wave form to
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 Inspect pane lists all logged signals in rows, organized by simulation run. 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.
Select the check boxes next to the
alpha, rad signals to plot them in the graphical
In the Simulation Data Inspector, you can inspect signals using data cursors.
On the Visualize tab, click the Data Cursors button to add one data cursor to the plot.
Drag the data cursor left or right to a point of interest. You can also use the arrow keys to move the data cursor.
To inspect the data at a specific point in time, click the data
cursor time field and enter the desired time value, for example
If the signal does not have a sample value at the point of interest, the Simulation Data Inspector linearly interpolates the value for the indicated time. An asterisk in the data cursor label indicates that the value is interpolated.
When you have finished inspecting the data, click the Data Cursors arrow and select Hide to remove the cursor from the graphical viewing area.
You can use subplot layouts to view groups of signals on different subplots. For example, you can group the same signal from different simulation runs or group signals that have a similar range of values.
In the model, double-click the Pilot block. Set Wave
square, and click OK.
Simulate the model.
In the Simulation Data Inspector, on the Visualize tab,
click Subplots and select a
Click the middle subplot in the graphical viewing
area. In the Inspect pane, select the check boxes
rad signals under
The check boxes in the Inspect pane indicate the signals plotted in the selected subplot, which is outlined in blue.
You can also move plotted signals to other subplots graphically, rather than using the check boxes.
Select the signal you want to move.
Drag the signal to the plot where you would like to see it.
For more information on working with plots, see Modify a Plot in the Simulation Data Inspector.
Subplots are linked by default, meaning that all plots in the graphical viewing area stay synchronized when you pan and zoom. Linked plots have a synchronized response when you:
Click a plot and drag to pan
Perform any zoom operation
Fit to view
To pan and zoom independently in a subplot, you can unlink the subplot.
Select the subplot you want to unlink.
Click the settings button in the upper right of the graph.
On the More tab, click the check box labeled Link Subplot.
The broken link symbol appears on the unlinked subplot.
You can filter runs and signals displayed in the Inspect pane to help search through large amounts of data in the Simulation Data Inspector. You can filter the data by text contained in the run or signal names and properties.
To show only the
alpha, rad signals, type
the filter signals text box. Matches for the search criteria are highlighted
in the filter results displayed in the pane. The filter dialog box
suggests completions for the text typed into the search query.
To filter for a signal or run property, use colons to separate
the property name and filter value. For example,
for signals that use port 1 in the model. Because the property column
is not visible in the Inspect pane, the result
is not highlighted.
You can also construct more complicated filter queries that include multiple properties using the Advanced section of the filter dialog box.
Open the Advanced section of the filter dialog box.
Select a column to add to the filter, and enter the value.
Filters work by matching text. For example, an absolute tolerance
filter for a value of
For convenience, you can save filter configurations. To save the filter, enter a name in the Save Search As box and click Save on the filter dialog box. Saved filters show as options in the filter list.
Simulation Data Inspector visualizes data from event-based systems with stem plots. To plot event-based or message data, mark the signal for logging. When you simulate the model, the data appears in the Simulation Data Inspector as a stem plot for each event.