# wlanBCCEncode

Convolutionally encode binary data

## Description

example

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

## Examples

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');
size(encodedData)
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 for the specified number of encoded streams.

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

BCC-encode the parsed sequence.

rate = 1/2;
encodedData = wlanBCCEncode(parsedData,rate);
size(encodedData)
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 17.3.5.6 and 19.3.11.6 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
1/21/2'1/2'"1/2"
2/32/3'2/3'"2/3"
3/43/4'3/4'"3/4"
5/65/6'5/6'"5/6"

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

## References

[1] IEEE Std 802.11™-2020 (Revision of IEEE Std 802.11-2016). “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.

## Version History

Introduced in R2017b