Why is the output of the Simulink 'Bitwise Operator' a matrix (CompiledPortDimension)

Why is the output of the Simulink 'Bitwise Operator' a matrix (CompiledPortDimension)?
Which other blocks behave the same way?

댓글 수: 2

What are the dimensions of the input(s) to the block in your model?
Independent of whether the input is scalar or a vector the CompiledPortDimension is something like
2 x x (for scalar input 2 1 1)

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

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2013년 6월 13일
It looks like the 'Bit Mask' parameter on the block may be a non-scalar in your block, which is why the output is a matrix even when the input is scalar.

댓글 수: 2

back to my problem: Input to the bitwise block is a vector with 4 uint16 (number of input ports is 1)
no mask
bitwise And/Or/ ...
then I get CompiledPortDimension 2 1 1
how can I decide that the outport signal is no matrix signal?
Ah! I think you may not be interpreting the CompiledPortDimension correctly - from my understanding, the first digit represent the number of dimensions, and the following digits represent the length of each dimension. So essentially, your output is a signal with dimensions 1x1 (ie. 2D signal). Does that make sense? For example, if the output were a mxnxp signal, CompiledPortDimension would be [3 m n p].

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

카테고리

제품

질문:

2013년 6월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by