Inspect Signal Data

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 slexAircraftExample model as an example.

View Signal Data

This example uses signal streaming to send data to the Simulation Data Inspector. You can also Record Logged Simulation Data or you can Import Signal Data from the base workspace or a MAT-file.

  1. In the MATLAB® Command Window, enter slexAircraftExample to open the model.

  2. To stream signals q, rad/sec, Stick, and 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.

  3. Double-click the Pilot signal generator block. Set Wave form to sine, and click OK.

  4. In the Simulink® Editor, click the Simulation Data Inspector button to open the Simulation Data Inspector.

  5. 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.

  6. To plot the signals, select the check box next to the q, rad/sec, Stick, and alpha, rad signals. The signal data appears in the plot.

Explore Signal Data

In the Simulation Data Inspector, you can inspect signal values at any point of the simulation using data cursors.

  1. On the Visualize tab, click Data Cursors to add one data cursor to the plot.

  2. Drag the data cursor left or right to a point of interest, or you can use the arrow keys to move the data cursor.

  3. You can move a data cursor to a specific point without dragging it. Click the data cursor time field and enter the time value 40.33.

    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.

  4. Click the Data Cursors arrow and select Hide.

View Signals on Multiple Plots

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.

  1. In the model, double-click the Pilot signal generator block. Set Wave form to square, and click OK.

  2. Simulate the model.

    A new run appears in the Simulation Data Inspector.

  3. In the Simulation Data Inspector, on the Visualize tab, click Subplots and select 3x1.

  4. Click the middle subplot. In the Runs pane, from Run 2, select the q, rad/sec, Stick, and alpha, rad signal check boxes.

    The signal check boxes show the signals that are plotted in the selected subplot, which is outlined in blue.

Move Signals Between Plots in a View

  1. Select the signal you want to move.

  2. 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.

Linked Subplots

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.

  1. Select the subplot you want to unlink.

  2. On the Format tab, click the Unlink a Subplot button on.

    The broken link symbol appears on the unlinked subplot.

Filter Runs and Signals

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.

  1. To show signals only with the name alpha, type alpha into the Filter Signals text box. The matches are highlighted in the filter results.

  2. 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.

  3. To save multiple filter terms to a filter name, open the Advanced section of the filter dialog box.

  4. Select a column filter criteria, and enter the filter value. This example uses the Run and Block Name columns as filter criteria.

      Note:   The filter matches text. For example, if you want to filter for absolute tolerance values of 0.1, then a filter of 00.1 will not return any filter results.

  5. To save the filter, enter a name in the Save Search As box. Click Save.

    The saved filter shows in the filter list.

Inspect Event-Based Data

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.

Related Examples

Was this topic helpful?