Filter löschen
Filter löschen

Can someone please provide me the script to delete all the simulink data inspector from the command window?

14 Ansichten (letzte 30 Tage)
I have currently added simulink data inspectors in many subsystems inside the model. Is there any script to delete these instead of going through the entire model and delete these?

Antworten (1)

Saffan
Saffan am 26 Jun. 2023
Hi Mahesh,
I can understand that you want to remove signal logging from all the signals in a model. You can run the following script to achieve that:
% Find all signals in the model
signalList = find_system('ModelName', 'FindAll', 'on', 'Type', 'line');
% Iterate over each signal
for i = 1:numel(signalList)
signalHandle = signalList(i);
Simulink.sdi.markSignalForStreaming(signalHandle,'off')
end
You can also disable signal logging for an entire model without removing them from each signal by running this command:
set_param("ModelName",'SignalLogging','off');
Refer to these links for more information:

Kategorien

Mehr zu Prepare Model Inputs and Outputs finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by