This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Inspect Simulation Data

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

Log and View Signals

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 .

  1. To open the model, enter slexAircraftExample in the MATLAB® Command Window.

  2. To log q, rad/sec, Stick, and alpha, rad to the Simulation Data Inspector, select each signal in the model. Then, click the Simulation Data Inspector drop-down, and select Log Selected Signals.

    The logging badge appears above each signal marked for logging.

  3. Double-click the Pilot 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 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.

  6. Select the check boxes next to the q, rad/sec, Stick, and alpha, rad signals to plot them in the graphical viewing area.

Explore Simulation Data

In the Simulation Data Inspector, you can inspect signals using data cursors.

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

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

    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.

  3. When you have finished inspecting the data, click the Data Cursors arrow and select Hide to remove the cursor from the graphical viewing area.

View Signals on Multiple Plots

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.

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

  2. Simulate the model.

  3. In the Simulation Data Inspector, on the Visualize tab, click Subplots and select a 3×1 arrangement.

  4. Click the middle subplot in the graphical viewing area. In the Inspect pane, select the check boxes for the q, rad/sec, Stick, and alpha, rad signals under Run 2.

    The check boxes in the Inspect pane indicate the signals plotted in the selected subplot, which is outlined in blue.

Move Signals Between Plots

You can also move plotted signals to other subplots graphically, rather than using the check boxes.

  1. Select the signal you want to move.

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

Linked Subplots

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.

  1. Select the subplot you want to unlink.

  2. Click the settings button in the upper right of the graph.

  3. On the More tab, click the check box labeled Link Subplot.

    The broken link symbol appears on the unlinked subplot.

Filter Runs and Signals

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 alpha into 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, port:1 filters 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.

  1. Open the Advanced section of the filter dialog box.

  2. Select a column to add to the filter, and enter the value.

      Note:   Filters work by matching text. For example, an absolute tolerance filter for a value of 00.1 does not return signals with an absolute tolerance of 0.1.

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.

Inspect Event-Based Data

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.

Related Topics

Was this topic helpful?