Be the first to rate this file! 198 downloads (last 30 days) File Size: 7.49 KB File ID: #23127

Changing the color of a block while the simulation runs

by Guy Rouleau

 

26 Feb 2009 (Updated 29 Apr 2009)

Code covered by BSD License  

Did you ever wanted to see the color of a block changing while a simulation is running?

Download Now | Watch this File

File Information
Description

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.

Required Products Simulink
MATLAB release MATLAB 7.7 (R2008b)
Zip File Content  
Other Files ChangeColor.m,
Test.mdl
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
29 Apr 2009

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

Tag Activity for this File
Tag Applied By Date/Time
simulink Guy Rouleau 26 Feb 2009 14:38:59
color Guy Rouleau 26 Feb 2009 14:38:59
runtime Guy Rouleau 26 Feb 2009 14:38:59
 

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