Multichannel operation is not supported.
19 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Satwik
2023-6-15
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);
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!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 BPSK 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!