How can i delete error of variable-size on Simulink?

조회 수: 3 (최근 30일)
Lotmeri
Lotmeri 2017년 9월 15일
답변: Abhi Sundararaman 2017년 9월 18일
Hello, my symulation on Simulink give me this error: "Simulink cannot propagate the variable-size mode from the output port 1 of 'PAM_with_header_Manchester/Data Decoding2/Rx' to the input port 2 of 'PAM_with_header_Manchester/Data Decoding2/Error Rate Calculation'. This input port expects a fixed-size mode. The variable-size mode originates from 'PAM_with_header_Manchester/Bit Generation1/Manchester Decode'. Examine the configurations of 'PAM_with_header_Manchester/Data Decoding2/Error Rate Calculation' for one of the following scenarios: 1) the block does not support variable-size signals; 2) the block supports variable-size signals but needs to be configured for them." How can I delete this error? I set "variable size" on the output/input port and set the upper bound for the size of my blocks. Thank you

채택된 답변

Abhi Sundararaman
Abhi Sundararaman 2017년 9월 18일
The "Error Rate Calculation" block does not support variable-sized signals, as confirmed by this documentation link:
One workaround you could try: Find the maximum output size for your "Rx" block. Then, if the output of Rx is less than this maximum size, add zeros to the output signal until it is the same size as the maximum size.
For example, say the output of the Rx block is [1 1 1] for one time step, and then [1 1 1 1 1] for another time step. The maximum size of this signal is 1x5, so the first time step's output should be "padded" with zeros, so that it becomes [1 1 1 0 0]. You could do this in a MATLAB function block.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by