To compare time series data, the Simulation Data Inspector:
Converts Simulink® time series data to MATLAB® time series data.
Aligns the time vectors using the default synchronization method union. (You can change the synchronization method for a signal: add the Sync Method column to the Navigation pane table and choose a method.)
Aligns the data vectors using the default interpolation method, zoh (zero-order hold). (You can change the interpolation method for a signal: add the Interpolation Method column to the Navigation pane table and choose a method.)
Differences the data.
Applies the specified tolerances for plotting the difference. For more information, see How the Simulation Data Inspector Applies Tolerances.
After it aligns signals from Baseline with signals from Compare To, the Simulation Data Inspector compares only the aligned signals. The Comparisons pane displays the results of all signal comparisons using these symbols.
|Signal from Baseline does not align with a signal from Compare To.|
The default value for the relative tolerance and absolute tolerance for a signal is zero. If you specify tolerances, then the Simulation Data Inspector calculates the tolerances as follows:
tolerance = max(absoluteTolerance,relativeTolerance*abs(baselineData));
If you want to change the relative tolerance or absolute tolerance, select the Rel Tol or Abs Tol columns in the Comparisons pane and type a value.
When the Simulation Data Inspector aligns signals across simulation runs, it attempts to match signals between runs using signal properties. On the Compare tab, click Comparison Options. In the dialog box, you can specify the signal properties to use to align signals, as shown in the table.
|Data Source||Path of the variable in the MATLAB workspace (streamed signals do not have a data source because they do not come from the workspace)|
|Path||Block path of the source signal that produced the data|
|SID||Simulink Identifier, which is consistent even when the block is renamed or moved|
|Signal Name||Name of the signal in the model|
By default, the Simulation Data Inspector is configured to first align signals by data source, then by path, then by SID, and then by signal name. For more information on how to change alignment settings, see Modify Signal Alignment for Comparisons.
An instance where a comparison of signals does not align is if a signal name is different between two runs and the Comparison Options alignment properties are set to align by signal name only. In this case, the signal comparison does not align.