Clear Filters
Clear Filters

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

3 views (last 30 days)
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

Accepted Answer

Abhi Sundararaman
Abhi Sundararaman on 18 Sep 2017
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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!