필터 지우기
필터 지우기

Signal dimensions of a bus in Simulink

조회 수: 22 (최근 30일)
Gijs van Oort
Gijs van Oort 2013년 1월 9일
In Simulink (the new editor, 2012b), I have some nested buses containing only (arrays of) doubles and buses (which in turn only contain doubles). Actually, I have a lot of them. Now when I check Display|Signals&Ports|Signal Dimensions, and do Update, I get, for each bus the size. The strange thing however is that it is shown inconsistently: sometimes I only see a number, such as 6, sometimes I see a number followed by a number in braces, such as 6 {6}, or 57 {84}.
I found out that, in the latter case, the first number is the number of elements in the bus (sum of all sub-elements in case of nested bus), and the second is the number of doubles (they differ if any of the elements is an array).
My question is: why do I sometimes only see a number, and sometimes number plus number in braces?
Gijs van Oort
  댓글 수: 2
Ryan G
Ryan G 2013년 1월 9일
Are you doing anything at all between updating your model?
Gijs van Oort
Gijs van Oort 2013년 1월 9일
No. The question is about two different buses in one model that behave differently (one has only a number, the other one a number plus braced number). Simulink's behaviour is consistent in the sense that, when I compile/update the same model multiple times, the buses behave identically each time. If I modify the model, the behaviour does change, clearly as a result of the modification (not as a result of coincidence).
I have the feeling that the difference in display does reflect a difference in way the bus is treated internally, but I don't have any idea in what sense (as far as I can find out, it is not a matter of virtual/nonvirtual buses. It could have something to do with implicit conversion of the bus to an array, but I cannot imagine that Simulink would allow that, and I don't want that to happen either).

댓글을 달려면 로그인하십시오.

답변 (1개)

Guy Rouleau
Guy Rouleau 2013년 1월 9일
I think your understanding is correct.
To verify that, go to the model configuration -> Diagnostics -> Connectivity
You will find 3 diagnostics controlling if Simulink can treat vectors as buses and vice-versa.
I introduce this and provide some background on why Simulink behaves this way here:

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by