User`s guide

18 Coverage Collection During Simulation
18-34
sldv.condition
sldv.test
sldv.assume
sldv.prove
For this example, consider the following model that contains a MATLAB Function block.
The MATLAB Function block contains the following code:
function y = fcn(u)
% This block supports MATLAB for code generation.
sldv.condition(u > -30)
sldv.test(u == 30)
y = 1;
To collect coverage for Simulink Design Verifier MATLAB functions, on the Coverage
Settings dialog box, on the Coverage tab, select Simulink Design Verifier.
After simulation, the model coverage report listed coverage for the sldv.condition and
sldv.test functions. For sldv.condition, the expression u > -30 evaluated to true
51 times. For sldv.test, the expression u == 30 evaluated to true 51 times.