%% Perform LDPC Rate Matching
% Create input data corresponding to two LDPC-encoded code blocks of length 3960.

encoded = ones(3960,2);

% Perform LDPC rate matching of the two code blocks to a vector of length 8000. Use single transmission layer with QPSK modulation and zero redundancy version.

rv = 0;                 
mod = 'QPSK';    
nLayers = 1;
outlen = 8000;
ratematched = nrRateMatchLDPC(encoded,outlen,rv,mod,nLayers);
size(ratematched)

% Copyright 2018 The MathWorks, Inc.