MATLAB: How to get control over the signals which are being logged in the model

simulink

I have a model with a lot of subsystems inside it. I want to know which signals are being logged in "logsout" output. I want to have control over the signals that are being logged. How do I do that?

Best Answer

You can use the 'InstrumentedSignals' property for each model level to determine what signals are/aren't logged. For example:
>> get_param(<insert_model_name>, 'InstrumentedSignals').
Using the set_param variation of the above API, you can programmatically log whichever signals you want to, provided they are known.
Please refer to the following links for more information on the above workflow: