Contents

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 with the slexAircraftExample model.

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

  4. Click the Data Cursors arrow and select Remove All Cursors.

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

Related Examples

Was this topic helpful?