File Exchange

image thumbnail

Delete unconnected lines

version 1.0 (1.6 KB) by

Delete unconnected lines under a Simulink system



View License

While "googling" the Matlab newsgroup I saw there were interest in being able to delete all unconnected lines inside a Simulink model. That is without actually doing it manually in the Simulink diagram.

Comments and Ratings (7)


Nancy (view profile)

works cleanly and as advertised. Put it as a project shortcut.

Fei Pan

Nice Thanks


Very useful code, but it doesn't work if the model parameters are not defined, though the parameters have nothing to do with the lines. but still this is not a problem at all, and the code works fine.

Christin Maier

Hi, I am trying to make a script, which deletes all contents of a simulink block diagram except its subfunctions, Ports and the lines between Subfunctions. Do you have any idea? (I know that's not the right place for the question but i am really in trouble)

Thierry Dalon

Very useful!
I've added this into my sl_customization.

Roberto Cantamessa

Malcolm Wood

Nice. Seems to deal with all the obvious edge-cases.

MATLAB Release
MATLAB 7.2 (R2006a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today