Multichannel operation is not supported.
15 ビュー (過去 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!