Dummy output S-function for Simulink

This minimal S-function implements a dummy output function. It receives a double input signal and ignores it completely. It does not perform any further action.

This S-function can be used to prevent Simulink from optimizing away blocks that have no effect on the model output. For example, if you have a block that performs some calculations but its output is not used anywhere, Simulink might optimize it away during code generation. By connecting the output of such a block to this dummy output S-function, you can ensure that the block remains in the model since Simulink can’t tell whether the output is used or not.

dummy_output.cpp

How to compile


Check out similar posts by category: Matlab/Simulink