5.0

5.0 | 1 rating Rate this file 19 downloads (last 30 days) File Size: 10.71 KB File ID: #24656

Replace Simulink Scope/Display Blocks with Terminators

by Stuart

 

07 Jul 2009

Code covered by BSD License  

Cleans Simulink models of all Scope and Display blocks by replacing them with Terminator blocks.

Download Now | Watch this File

File Information
Description

Simulink developers may use scope and display blocks during model development. However, these blocks sometimes get buried deep inside subsystems and consequently never removed during model clean-up. These lost blocks can effect the run-time of the model according to The Mathworks: http://www.mathworks.com/support/solutions/data/1-18AAG.html?solution=1-18AAG

This m-class file loads a simulink model, searches it for scope and display blocks (including inside subsystems and masked blocks), and replaces each instance with a Terminator block. The reverse process is also possible should the user desire to recover the original scope & display blocks at some time in the future. This is done without disturbing the integrity of the simulink model itself or any other blocks within the model.

Includes a simulink model and an example of how to run the code.

Files Included:
simulinkModelCleaner.m
smcTest.m
fallingBallExample.mdl

Required Products Simulink
MATLAB release MATLAB 7.8 (R2009a)
Zip File Content  
Other Files fallingBallExample.mdl,
license.txt,
simulinkModelCleaner.m,
smcTest.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
12 Oct 2009 Patrik Eschle

Nicely done and commented, thanks

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
simulink Stuart 08 Jul 2009 10:45:28
clean Stuart 08 Jul 2009 10:45:28
scrub Stuart 08 Jul 2009 10:45:28
replace_blocks Stuart 08 Jul 2009 10:45:28
model Stuart 08 Jul 2009 10:45:28
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com