[英]Could LDPC function change length of message? and how?
This is MATLAB code about LDPC
(Low Density Parity Check).这是关于
LDPC
(低密度奇偶校验)的 MATLAB 代码。 Could I change the length of data
?我可以更改
data
的长度吗? and how?如何?
ldpcEncoder = comm.LDPCEncoder;
data = logical(randi([0 1],32400,1));
% Transmit and receive LDPC coded signal data
encData = ldpcEncoder(data);
I try to change the length of data
, but MATLAB always warns that "Input must be a column vector of length K
, the message length."我尝试更改
data
的长度,但 MATLAB 总是警告“输入必须是长度为K
的列向量,即消息长度。” Is this length of data
is fixed?这个
data
长度是固定的吗?
The input of the LDPC codes should be always of length K
, otherwise, the parity matrix would change and the code would be different. LDPC 码的输入应该总是长度为
K
,否则,奇偶校验矩阵会改变,码会不同。 When you create an LDPCEncoder
object in MATLAB, you are defining the K
and N
lengths, so the input data can't change.当您在 MATLAB 中创建
LDPCEncoder
object 时,您正在定义K
和N
长度,因此输入数据不能更改。
Yes, you can.是的你可以。 You can create your comm.LDPCEncoder with certain parity check matrix in the following way:
您可以通过以下方式创建具有特定奇偶校验矩阵的 comm.LDPCEncoder:
comm.LDPCEncoder(ParityCheckMatrix)
For example, if you want to generate a DVB-S2 encoder for a code rate of 1/2, the code will be:例如,如果要生成码率为 1/2 的 DVB-S2 编码器,则代码为:
p = dvbs2ldpc(1/2);
enc = comm.LDPCEncoder(p);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.