Question

I've built a Simulink model and I would like to 'Comment Through' some blocks via a MATLAB script. I am using MATLAB 2013b.

I know that the command set_param('BlockAddress','Commented','on') comments out the block from the simulation, but that's not the same thing.

Instead of the string 'Commented' in the set_param code, I was hoping to find a block property that defines the 'Comment Through' state, but I could not find it in MATLAB's Common Block Properties page.

Does anyone know if such property is defined, or, if not, a different work-around to comment through blocks by using a script?

Was it helpful?

Solution

Despite MATLAB did not mention 'through' among the possible values for the 'Commented' property, this is the code to comment out blocks using set_param:

set_param('BlockAddress','Commented','through')

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top