Question
I am wondering whether there is a way to exclude blocks for coverage analysis from the Test Manager. Even if I right-click on a block in the model and exclude it from coverage analysis, when I run a test in the Test Manager and generate the coverage report, the block has not been actually excluded.
Expert Answer
Kshitij Singh
PhD Expert
Answered Aug 20, 2026
It is possible to do so by first saving your filter to a file, and then setting the filter (CovFilter) in the model.
Please refer to the following steps:
1. Open Simulink model:
>> slvnvdemo_covfilt
2. Right click on 'Normal config (feedthrough)' > Coverage > Exclude subsystem with all descendants
3. For Rationale, type 'myRationale', then Apply
4. From the Filter Viewer, click on Save Filter and save as 'myFilter.cvf'
5. In Configuration Parameters, navigate to Coverage > Advanced Parameters > Coverage filter filename, and specify name of the filer ('myFilter' in this case)
This can also be done programmatically as follows:
>> set_param(gcs,'CovFilter','myFilter')
6. From the model, click on Analysis > Test manager
7. New > Test File, and save as 'myTest.mldatx'
8. For System under test, select 'use current model'
9. In the Test File 'myTest', navigate to Coverage settings and select 'Record coverage for system under test'
10. Run test
Now, go to the Results and Artifacts section, navigate to Aggregated Coverage Results to generate report, and verify that SubSystem block "Normal config (feedthrough)" has been excluded from coverage analysis.
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related coverage Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →