Simulink: How to set TestPoint state of all selected signals programmatically

The following code snippet demonstratests how to set the TestPoint state of all currently selected signal lines to 1 (i.e. testpoint enabled) in a Simulink model using MATLAB.

It builds upon our previous post Simulink: How to query selected signal / line programatically.

mktestpoint.m

The above code can be saved as a MATLAB script file named mktestpoint.m for easy reuse:


Check out similar posts by category: Matlab/Simulink