Outputs and Tolerances

Log simulation data, set value and time tolerances, capture and update baseline data

Tests require defined signals of interest and tolerances on numeric data. For large models, or models with deep hierarchy, you can use an Observer block to access relevant signals and capture outputs in your test results. You can also select signals in the Test Manager. Test results automatically include signals that have been selected for logging in your model.

For tests that compare output to baseline data, or tests that compare two simulations, you can compare results using relative, absolute, leading, and lagging tolerances. Leading and lagging tolerances are useful for comparisons in which the data timing differs, such as comparisons between different solvers, or comparisons between models running on your desktop and code running on a target.

Topics

Capture Simulation Data in a Test Case

Select signals to log, visualize, and export.

Set Signal Tolerances

Specify value and time tolerances for baseline and equivalence criteria.

Process Test Results with Custom Scripts

Create scripts that post-process results using toolbox functions and the MATLAB® Unit Test framework.

Featured Examples