www.gusucode.com > LTE_TX_PDSCH > LTE_TX_CRC24A.m

    %% CRC encoding using CRC type 'A' defined in standard

function b = LTE_TX_CRC24A(a)

% CRC24A(D) = [D24 + D23 + D18 + D17 + D14 + D11 + D10 + D7 + D6 + D5 + D4
% + D3 + D + 1]  for a CRC length L = 24
h = crc.generator('0x864CFB');
h.ReflectRemainder = true;
h.ReflectInput = true;
b = generate(h,a')';