Multichannel operation is not supported.

15 views (last 30 days)
Putri Adinatha
Putri Adinatha on 7 Jun 2023
Answered: Satwik on 15 Jun 2023
i tried doing encoding and modulation using
enc = comm.LDPCEncoder;
bpskMod = comm.BPSKModulator('PhaseOffset',pi/2);
data = randi([0 1], 256, 8);
encodedData = enc(data);
shows error as
EError using LDPCEncoder/parenReference Multichannel operation is not supported.
i also tried using encodedData = enc(data.'); and it still show the same error.
please help. thank you.

Answers (1)

Satwik
Satwik on 15 Jun 2023
Hi Putri,
I understand that your code is giving an error when you try to encode a 256x8 binary matrix with a LDPCEncoder .The error message is "Multichannel operation is not supported."
For an LDPCEncoder the input data must be a single column matrix i.e. K x 1, hence the data should be
data = randi([0 1],K,1);
Unrecognized function or variable 'K'.
Where K is by default initialized as 32400. This default value comes from the of ParityCheckMatrix whose size is by default set to 32400 x 64800 sparse logical.
To change the value of K you need to change the size of ParityCheckMatrix itself.
enc.ParityCheckMatrix = sparse([eye(256) eye(256)]);
The above code will change the size of ParityCheckMatrix to 256 x 512 sparse logical.
Now you can make your data 256 x 1 size matrix.
Please look into the below code for reference:
enc = comm.LDPCEncoder;
% enc.ParityCheckMatrix % If you want to see the default ParityCheckMatrix
bpskMod = comm.BPSKModulator('PhaseOffset',pi/2);
enc.ParityCheckMatrix = sparse([eye(256) eye(256)]); % Can be changed to any size depending on your usecase
data = randi([0 1],256,1); % Data matrix should only have a single column
encodedData = enc(data);
Hope this helps!

Community Treasure Hunt

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

Start Hunting!