Hi,
I understand that you are encountering the error when you are trying to adjust the parameters in the Reed-Solomon code.
The error is occurring because there is a mismatch between the dimensions of the input data and the requirements of the ‘comm.RSEncoder’ object. The ‘comm.RSEncoder’ expects the input data to have specific dimensions based on the ‘BitInput’ property, message length, codeword length, and primitive polynomial.
To resolve this issue, you can try to change the values of N, K, S, M in your code.
For example, I took these sample values respectively.
N = 130; % Codeword length
K = 100; % Message length
S = 70; % Shortened message length
M = 256; % Modulation order
The size of ‘encData’ obtained is equal to (1040*1).
You can try to tune these values in order to obtain the desired size of the ‘encData’.
Refer to the documentation of ‘comm.RSEncoder’ to get more information on how the values of N, K, S, M are to be selected.