This submission contains a level 2 M-file s-function that changes the background color of a block while the simulation runs.
In the block dialog box, specify which block you want to be affected. Look at the M-code to change the logic of color switching to fit your application.
Modified to automatically change the color of the block connected to the output port. Added a parameter to set the value at which the color switches
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.