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 with the
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 the signal was not sampled at a point of interest, then the Simulation Data Inspector linearly interpolates the value. An asterisk appears in the data cursor label if the value is interpolated.
Click the Data Cursors arrow and select Remove All Cursors.
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 Format 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.