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