The Simulation Data Inspector supports a wide range of use cases for analyzing and visualizing data. You can modify preferences in the Simulation Data Inspector to match your visualization and analysis requirements. The preferences that you specify persist between MATLAB® sessions.
By specifying preferences in the Simulation Data Inspector, you can configure options such as:
How signals and metadata are displayed.
Which data automatically imports from parallel simulations.
Where prior run data is retained and how much prior data to store.
How much memory is used during save operations.
The system of units used to display signals.
Open the Simulation Data Inspector preferences by selecting the Preferences button.
You can restore all preferences in the Simulation Data Inspector to default values by clicking Restore Defaults in the dialog or by using the
By default, simulation data logs to disk with data loaded into memory on demand, and the maximum size of logged data is constrained only by available disk space. You can use the Disk Management settings in the Simulation Data Inspector to directly control the size and location of logged data.
The Record mode setting specifies whether logged data is retained after simulation. When you change the Record mode setting to View during simulation only, no logged data is available in the Simulation Data Inspector or the workspace after the simulation completes. Only use this mode when you do not want to save logged data. The Record mode setting reverts to View and record data each time you start MATLAB. Changing the Record mode setting can affect other applications, such as visualization tools. For details, see View Data Only During Simulation.
To directly limit the size of logged data, you can specify a minimum amount of free
disk space or a maximum size for the logged data. By default, logged data must leave at
least 100 MB of free disk space with no maximum size limit. Specify the required disk
space and maximum size in GB, and specify
0 to apply no disk space
requirement or no maximum size limit.
When you specify a minimum disk space requirement or a maximum size for logged data, you can also specify whether to prioritize retaining data from the current simulation or data from prior simulations when approaching the limit. By default, the Simulation Data Inspector prioritizes retaining data for the current run by deleting data for prior runs. To prioritize retaining prior data, change the When low on disk space setting to Keep prior runs and stop recording. You see a warning message when prior runs are deleted and when recording is disabled. If recording is disabled due to the size of logged data, you need to change the Record Mode back to View and record data to continue logging data, after you have freed up disk space. For more information, see Specify a Minimum Disk Space Requirement or Maximum Size for Logged Data.
The Storage Mode setting specifies whether to log data to disk or to memory. By default, data logs to disk. When you configure a parallel worker to log data to memory, data transfer back to the host is not supported.
You can also specify the location of the temporary file that stores logged data. By default, data logs to the temporary files directory on your computer. You may change the file location when you need to log large amounts of data and a secondary drive provides more storage capacity. Logging data to a network location can degrade performance.
You can programmatically configure and check each preference value.
Required Free Space
Max Disk Usage
When low on disk space
The Simulation Data Inspector archive stores runs in a collapsible pane, allowing you to manage the contents of the work area without deleting run data. You can configure whether the Simulation Data Inspector automatically moves prior simulation runs to the archive. You can also limit the number of runs stored in the archive.
By default, the Simulation Data Inspector automatically archives simulation runs. When you simulate a model, the prior simulation run moves to the archive, and the Simulation Data Inspector updates the view to show the data for aligned signals in the current run.
The archive does not impose functional limitations on the runs and signals it contains. You can plot signals from the archive, and you can use runs and signals in the archive in comparisons. You can drag runs of interest from the archive to the work area and vice versa whether the Automatically Archive setting is enabled or disabled. To prevent the Simulation Data Inspector from automatically moving prior simulations runs to the archive, clear the Automatically archive setting.
When you import runs into the Simulation Data Inspector, the imported runs appear in the work area, and the Current tag remains on the most recent simulation run. You can import signals to existing runs in the work area and in the archive.
You can delete the contents of the archive manually using the trash icon.
To reduce the amount of data the Simulation Data Inspector retains, you can configure a limit for the number of runs stored in the archive. When the number of runs in the archive reaches the size limit, the Simulation Data Inspector starts to delete runs on a first-in, first-out basis.
The size limit applies only to runs in the archive. For the Simulation Data Inspector to automatically limit the data it retains by deleting old runs, select Automatically archive and specify a size limit.
By default, the Simulation Data Inspector retains the last
runs moved to the archive. To remove the limit, select No
limit. To specify the maximum number of runs to store in the
archive, select Last n runs and enter the desired limit. The
Simulation Data Inspector warns you when you specify a limit that would delete runs
already in the archive.
Configure the Automatically archive setting programmatically
Specify the number of runs to retain in the archive using the
You can configure how the Simulation Data Inspector handles incoming runs from import or simulation. You can choose whether new runs are added at the top of the work area or the bottom and specify a naming rule to use for runs created from simulation.
By default, the Simulation Data Inspector adds new runs below prior runs in the work area. The Archive settings also affect the location of runs. By default, prior runs are moved to the archive when a new simulation run is created.
The run naming rule is used to name runs created from simulation. You can create the
run naming rule using a mix of literal text that is used in the run name as-is and one
or more tokens that represent metadata about the run. By default, the Simulation Data
Inspector names runs using the run index and model name:
To rename an existing run, double-click the name in the work area and enter the new name, or modify the run name in the Properties pane.
You can programmatically check and modify the naming rule using the
functions. Restore the naming rule to its default programmatically using the
You can control which signal metadata is displayed in the work area of the Inspect pane and in the results section on the Compare pane in the Simulation Data Inspector. You specify the metadata to display separately for each pane using the Table Columns preferences in the Inspect and Compare sections of the Preferences dialog, respectively.
By default, the signal name and the line style and color used to plot the signal are displayed on the Inspect pane. To display different or additional metadata in the work area on the Inspect pane, select the check box next to each piece of metadata you want to display in the Table Columns preference in the Inspect section. You can always view complete metadata for the selected signal in the Inspect pane using the Properties pane.
Metadata displayed in the work area on Inspect pane is included when you generate a report of plotted signals. You can also specify metadata to include in the report regardless of what is displayed in the work area when you create the report programmatically using the
By default, the Compare pane shows the signal name, the absolute and relative tolerances used in the signal comparison, and the maximum difference from the comparison result. To display different or additional metadata in the results on the Compare pane, select the check box next to each piece of metadata you want to display in the Table Columns preference in the Compare section. You can always view complete metadata for the signals compared for a selected signal result using the Properties pane, where metadata that differs between the compared signals is highlighted. Signal metadata displayed on the Compare pane does not affect the contents of comparison reports.
You can configure how you select signals to plot on the selected subplot in the Simulation Data Inspector. By default, you use check boxes next to each signal to plot. You can also choose to plot signals based on selection in the work area. Use Check Mode when creating views and visualizations that represent findings and analysis of a data set. Use Browse Mode to quickly view and analyze data sets with a large number of signals.
For more information about creating visualizations using Check Mode, see Create Plots Using the Simulation Data Inspector.
For more information about using Browse Mode, see Visualize Many Logged Signals.
To use Browse Mode, your layout must include only Time Plot visualizations.
When you compare runs using the Simulation Data Inspector, the comparison algorithm pairs signals for signal comparison through a process called alignment. You can align signals between the compared runs using one or more of the signal properties shown in the table.
|Data Source||Path of the variable in the MATLAB workspace for data imported from the workspace|
|Path||Block path for the source of the data in its model|
For more information about SIDs, see Simulink Identifiers
|Signal Name||Name of the signal|
You can specify the priority for each piece of metadata used for alignment. The Align By field specifies the highest priority property used to align signals. The priority drops with each subsequent Then By field. You must specify a primary alignment property in the Align By field, but you can leave any number of Then By fields blank.
By default, the Simulation Data Inspector aligns signals between runs according to this flow chart.
For more information about configuring comparisons in the Simulation Data Inspector, see How the Simulation Data Inspector Compares Data.
You can configure the colors used to display comparison results using the Simulation Data Inspector preferences. You can specify whether to use the signal color from the Inspect pane or a fixed color for the baseline and compared signals. You can also choose colors for the tolerance and the difference signal.
By default, the Simulation Data Inspector displays comparison results using fixed colors for the baseline and compared signals. Using a fixed color allows you to avoid the baseline signal color and compared signal color being either the same or too similar to distinguish.
You can specify how to group signals within a run in the Simulation Data Inspector. The preferences apply to both the Inspect and Compare panes. You can group signals by:
Domain — Signal type. For example, signals created by signal logging have
a domain of
Signal, while signals created from logging
model outputs have a domain of
Physical System Hierarchy — Signal Simscape™ physical system hierarchy. The option to group by physical system hierarchy is available when you have a Simscape license.
Data Hierarchy — Signal location within structured data. For example, data hierarchy grouping reflects the hierarchy of a bus.
Model Hierarchy — Signal location within model hierarchy. Grouping by model hierarchy can be helpful when you log data from a model that includes model or subsystem references.
Grouping signals adds rows for the hierarchical nodes, which you can expand to show the signals within that node. By default, the Simulation Data Inspector groups signals by domain, then by physical system hierarchy (if you have a Simscape license), and then by data hierarchy.
To remove grouping and display a flat list of signals in each run, select
None for all grouping options.
To specify how to group signals programmatically, use the
When you run parallel simulations using the
parsim function, you can stream logged simulation data to the Simulation Data Inspector. A dot next to the run name in the Inspect pane indicates the status of the simulation that corresponds to the run, so you can monitor simulation progress while visualizing the streamed data. You can control whether data streams from a parallel simulation based on the type of worker the data comes from.
By default, the Simulation Data Inspector is configured for manual import of data from parallel workers. You can use the Simulation Data Inspector programmatic interface to inspect the data on the worker and decide whether to send it to the client Simulation Data Inspector for further analysis. To manually move data from a parallel worker to the Simulation Data Inspector, use the
You may want to automatically stream data from parallel simulations that run on local workers or on local and remote workers. Streaming data from both local and remote workers may affect simulation performance, depending on how many simulations you run and how much data you log. When you choose to stream data from local workers or all parallel workers, all logged simulation data automatically shows in the Simulation Data Inspector.
You can configure Simulation Data Inspector support for parallel worker data programmatically using the
You can specify a maximum amount of memory to use while loading or saving a session file. By default, the Simulation Data Inspector uses a maximum of 100 MB of memory when you load or save a session file. You can specify a memory use limit as low as 50 MB.
To reduce the size of the saved session file, you can specify a compression option.
None — Do not compress saved data.
Normal — Compress the saved file as much as possible.
Fastest — Compress the saved file less than
Normal compression for faster save time.
Signals in the Simulation Data Inspector have two units properties: stored units and display units. The stored units represent the units of the data saved to disk. The display units specify how the Simulation Data Inspector displays the data. You can configure the Simulation Data Inspector to use a system of units to define the display units for all signals. You can choose either the SI or US Customary system of units, or you can display data using its stored units.
When you use a system of units to define display units for signals in the Simulation Data Inspector, the display units update for any signal with display units that are not valid for that unit system. For example, if you select SI units, the display units for a signal may update from
The system of units you choose to use in the Simulation Data Inspector does not affect the stored units for any signal. You can convert the stored units for a signal using the
convertUnits function. Conversion may result in loss of precision.
In addition to selecting a system of units, you can specify override units so that all signals of a given measurement type are displayed using consistent units. For example, if you want to visualize all signals that represent weight using units of
kg as an override unit.
For a list of units supported by Simulink, enter
showunitslist in the MATLAB Command Window.
You can also modify the display units for a specific signal using the Properties pane. For more information, see Modify Signal Properties in the Simulation Data Inspector.