MATLAB: Replace GoTo Block in Simulink

busgotosimulink

Hello I need to modularize an existing simulink model. In this model tons of GoTo blocks were used. But they make the code unreadable and i dont have a clear interfaces for my moduls. So I want to replace the GoTo Blocks with BusSignals in and out of the moduls. Is there any simple way e.g. by a script to replace the GoTo blocks with signals going into a bus? Or do I have to do this manually?

Best Answer

You could technically write a MATLAB script using Simulink command-line functionality to do the replacement for you, but depending on the complexity of your model/interfaces, it may or may not be simpler to do it manually compared to writing a script.
Related Question