Convolutionally encode binary data



y = wlanBCCEncode(bits,rate) convolutionally encodes the binary input bits using a binary convolutional code (BCC) at the specified rate.


collapse all

Encode a sequence of data bits by using a BCC of rate 3/4.

Create the sequence of data bits.

dataBits = randi([0 1],300,1);

BCC-encode the data bits.

encodedData = wlanBCCEncode(dataBits,'3/4');
ans = 1×2

   400     1

Encode two streams of data bits by using a BCC of rate 1/2.

Create the sequence of data bits.

dataBits = randi([0 1],100,1,'int8');

Parse the sequence of bits as defined in IEEE® 802.11™-2012 Section and IEEE® 802.11ac™-2013 Section numES is the number of encoded streams.

numES = 2;
parsedData = reshape(dataBits,numES,[]).';

BCC-encode the parsed sequence.

encodedData = wlanBCCEncode(parsedData,1/2);
ans = 1×2

   100     2

Input Arguments

collapse all

Input sequence with data bits to encode, specified as a binary matrix. The number of columns must equal the number of encoded streams. Each stream is encoded separately.

For more information on BCC, see Sections and in [1].

Data Types: double | int8

Code rate of the binary convolutional code (BCC), specified as a numeric scalar, character vector, or string scalar. To select a code rate, specify this input as a value in accordance with the table.

Code RateScalarCharacter VectorString

Example: '3/4'

Data Types: double | char | string

Output Arguments

collapse all

Binary convolutionally encoded output, returned as a binary matrix of the same type as the bits input. The number of rows of y is the result of dividing the number of rows of input bits by rate, rounded to the next integer. The number of columns of y is equal to the number of columns of bits.

Data Types: double | int8


[1] IEEE Std 802.11™-2016 (Revision of IEEE Std 802.11-2012). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications.” IEEE Standard for Information technology — Telecommunications and information exchange between systems. Local and metropolitan area networks — Specific requirements.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2017b