- Turn logging on or off for a signal - MATLAB Simulink.sdi.markSignalForStreaming (mathworks.com)
- Save Signal Data Using Signal Logging - MATLAB & Simulink (mathworks.com)
- Close the Simulation Data Inspector - MATLAB Simulink.sdi.close (mathworks.com)
Can someone please provide me the script to delete all the simulink data inspector from the command window?
19 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
Saffan
2023-6-26
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:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Prepare Model Inputs and Outputs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!