wlanBCCDecode
Convolutionally decode input data
Syntax
y = wlanBCCDecode(sym,rate)
y = wlanBCCDecode(sym,rate,decType)
y = wlanBCCDecode(sym,rate,tDepth)
y = wlanBCCDecode(sym,rate,decType,tDepth)
Description
Examples
BCC-Decode Two Encoded Streams
通过使用1/2的BCC来解码两个软位编码的软位。
Create the sequence of data bits.
dataBits = randi([0 1],100,1,'int8');
解析IEEE®802.11™-2012第20.3.11.5节和IEEE®802.11AC™-2013第22.3.10.3.10.5.2节中定义的数据位。numES
is the number of encoded streams.
numES = 2; parsedData = reshape(dataBits,numES,[]).';
BCC-encode the parsed sequence.
encodedData = wlanBCCEncode(parsedData,'1/2');
将编码的位转换为软位(即LLR解调)。
demoddata = double(1-2*encodeddata);
BCC-decode the demodulated data.
decodedData = wlanBCCDecode(demodData,'1/2');
Deparse the decoded data.
deparsedData = reshape(decodedData.',[],1);
Verify that the decoded data matches the original data.
isequal(dataBits,deparsedData)
ans =logical1
bcc-decode软位
Decode a sequence of soft bits by using a BCC of rate 3/4 and a traceback depth of 60.
Create the sequence of data bits.
dataBits = randi([0 1],300,1);
bcc concode位的序列。
encodedData = wlanBCCEncode(dataBits,3/4);
将编码的位转换为软位(即LLR解调)。
demodData = 1-2*encodedData;
BCC-decode the demodulated bits.
tDepth = 60; decodedData = wlanBCCDecode(demodData,3/4,tDepth);
Verify that the decoded data matches the original data.
que equal(数据代表,解码DATA)
ans =logical1
BCC-Decode Hard Bits
Decode a sequence of hard bits by using a BCC of rate 3/4 and a traceback depth of 45.
Create the sequence of data bits.
databits = randi([0 1],300,1,'int8');
bcc concode位的序列。
encodedData = wlanBCCEncode(dataBits,'2/3');
在编码位上执行硬BCC解码。指定追溯深度45。
tdepth = 45;解码器= wlanbccdecode(encodeddata,'2/3','hard',tdepth);
Verify that the decoded bits match the original bits.
que equal(数据属,解码器)
ans =logical1
Input Arguments
sym
—Input sequence
matrix
Input sequence of symbols to decode, specified as a numeric matrix of integers. The number of columns must be the number of encoded streams. Each stream is encoded separately. Whendectype
is'soft'
或未指定,sym
must be a real matrix with log-likelihood ratios. Positive values represent a logical 0 and negative values represent a logical 1.
Data Types:double
|int8
rate
—代码速率
1/2|2/3|3/4|5/6
代码速率of the binary convolutional code (BCC), specified as a scalar, character array, or string scalar.rate
must be a numeric value equal to 1/2, 2/3, 3/4, or 5/6, or a character vector or string scalar equal to'1/2'
,'2/3'
,'3/4'
, or'5/6'
。
Example:'3/4'
Data Types:double
|char
|string
dectype
—Decoding type
'soft'
(default) |'hard'
Decoding type of the binary convolutional code (BCC), specified as a character vector or a string scalar. It can be'hard'
for a hard input Viterbi algorithm, or'soft'
for a soft input Viterbi algorithm without any quantization.
Data Types:char
|string
tDepth
—追溯深度
positive integer
追溯深度of the Viterbi decoding algorithm, specified as a positive integer less than or equal to the number of input symbols insym
。
Example:y = wlanBCCDecode(sym,'1/2','hard',50)
Data Types:double
Output Arguments
y
— Binary convolutionally decoded output
matrix
Extended Capabilities
C/C++ Code Generation
使用MATLAB®CODER™生成C和C ++代码。
Usage notes and limitations:
Use in aMATLAB Functionblock is not supported.
See Also
Introduced in R2017b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:。
您还可以从以下列表中选择一个网站:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- AméricaLatina(Español)
- Canada(English)
- United States(English)
欧洲
- Belgium(English)
- 丹麦(English)
- Deutschland(德意志)
- España(Español)
- Finland(English)
- 法国(Français)
- 爱尔兰(English)
- Italia(Italiano)
- Luxembourg(English)
- Netherlands(English)
- 挪威(English)
- Österreich(德意志)
- Portugal(English)
- Sweden(English)
- Switzerland
- United Kingdom(English)