How to display a mux signals bits?

4 vues (au cours des 30 derniers jours)
hugo
hugo le 25 Avr 2012
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

Réponses (1)

Kaustubha Govind
Kaustubha Govind le 25 Avr 2012
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

Community Treasure Hunt

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

Start Hunting!

Translated by