![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1430273/image.png)
Simulink wire different colors
97 次查看(过去 30 天)
显示 更早的评论
My Simulink model is a pretty basic one. When I compile it, a few connections appear in Black and others in Red. There is no differentiator also like input, output, wire/bus, virtual/non-virtual bus, etc. How do I change the color of the wires to all Red?
0 个评论
采纳的回答
Sahas Marwah
2023-7-9
Assuming you are using R2023a version,
The color of wires are dependent on the "sample time" of your model. Different colors may be due to constants, or other blocks having different "sample times".
One can change that by double clicking the said block, and change the sample time to "-1", which is also the default and should match the colors of different wires coming in and out of that block.
Alternately, one can also click on the two arrow lines on the left pane of Simulink view (image attached) to open "Timing Legends" and change the colors of different types of blocks from there.
Alternately, if one wants no colors except the default ones, they can go to "Debug" tab --> "Information Overlays" --> "Colors" and disable colors.
https://in.mathworks.com/help/simulink/ug/how-to-specify-the-sample-time.html -- Documentation to Specifying Sample Time
https://in.mathworks.com/help/simulink/ug/how-to-view-sample-time-information.html -- Documentation to Sample Time Legends
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1430273/image.png)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!