How to display a mux signals bits?

4 次查看(过去 30 天)
hugo
hugo 2012-4-25
I have a lot of booleans that goes to a logical block. I want a easy way to get a overview on the values on those booleans. Is there a way that I can mux the signals and display them? I want to see the bits not the value its represent. For example: I have 10 booleans, then I want a sequence thats look like 1001001110

回答(1 个)

Kaustubha Govind
Kaustubha Govind 2012-4-25
What you want to do is string-based concatenation. Since strings are not supported signal types in Simulink, it might be best to implement something that approximates this using basic Simulink blocks. For example, if your input bits are signals u1...u10, and y is the concatenated signal, you can compute y using:
y = u1+10*u2+10^2*u3+...+10^9*u10

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by