%% Perform LDPC Rate Recovery
% Create input data of length 4500 corresponding to soft bits. The length of the original transport block is 4000. Perform LDPC rate recovery of the input to one code block. Use single transmission layer with QPSK modulation and zero redundancy version.

sbits = ones(4500,1);
trblklen = 4000;    
R = 0.5;                
rv = 0;                 
mod = 'QPSK';           
nlayers = 1;            
numCB = 1;              
raterec = nrRateRecoverLDPC(sbits,trblklen,R,rv,mod,nlayers,numCB);
size(raterec)

% Copyright 2018 The MathWorks, Inc.