| Communications Toolbox 3.0 Release Notes | ![]() |
If your existing M-code processes BCH codes, then you might want to update it to use the enhanced BCH capabilities. Here are some important points to keep in mind:
Use bchenc instead of bchenco and encode(...,'bch').
Use bchdec instead of bchdeco and decode(...,'bch').
Use bchgenpoly instead of bchpoly.
bchenc and bchdec use Galois arrays for the messages and codewords. To learn more about Galois arrays, see Representing Elements of Galois Fields.
bchenc places (and bchdec expects to find) the parity symbols at the end of each word by default. To process codes in which the parity symbols are at the beginning of each word, use the string 'beginning' as the last input argument when you invoke bchenc and bchdec.
To help you update your existing M-code that processes BCH codes, the example below illustrates how to encode data using the new bchenc function and the earlier encode and bchenco functions.
% Basic parameters for coding n = 15; k = 11; % Message length and codeword length w = 10; % Number of words to encode in this example % R13 binary vector format mydata_r13 = randint(w*k,1); % Long vector % R13 binary matrix format mydata_r13_mat = reshape(mydata_r13,k,w)'; % One message per row % R13 decimal format mydata_r13_dec = bi2de(mydata_r13_mat); % Convert to decimal. % Equivalent R14 Galois array format mydata_r14 = fliplr(gf(mydata_r13_mat)); % Encode the data using R13 methods. code_r13 = encode(mydata_r13,n,k,'bch'); code_r13_mat = encode(mydata_r13_mat,n,k,'bch'); code_r13_dec = encode(mydata_r13_dec,n,k,'bch/decimal'); code_r13_bchenco = bchenco(mydata_r13_mat,n,k); % Encode the data using R14 method. code_r14 = bchenc(mydata_r14,n,k); codeX = fliplr(double(code_r14.x)); % Retrieve from Galois array. % Check that all resulting codes are the same. % c1, c2, c3, and c4 should all be true. c1 = isequal(de2bi(code_r13_dec),code_r13_mat); c2 = isequal(reshape(code_r13,n,w)',code_r13_mat); c3 = isequal(code_r13_bchenco,code_r13_mat); c4 = isequal(code_r13_mat,codeX); % Compare R13 with R14.
The encode and decode functions no longer perform BCH encoding and decoding. Use the bchenc and bchdec functions instead.
The table below lists functions that are obsolete. Although they are included in Release 13 for backward compatibility, they might be removed in a future release. The second column lists functions that provide similar functionality. In some cases, the similar function requires different input arguments or produces different output arguments, compared to the original function.
| Obsolete Function | Similar Function in R14 |
|---|---|
| ademod | amdemod, fmdemod, pmdemod, ssbdemod |
| ademodce | Use passband demodulation instead: amdemod, fmdemod, pmdemod, ssbdemod |
| amod | ammod, fmmod, pmmod, ssbmod |
| amodce | Use passband modulation instead: ammod, fmmod, pmmod, ssbmod |
| apkconst | genqammod or pskmod for mapping; scatterplot for plotting |
| bchdeco | bchdec |
| bchenco | bchenc |
| bchpoly | bchgenpoly |
| ddemod | Use baseband demodulation instead: genqamdemod, pamdemod, pskdemod, qamdemod, fskdemod |
| ddemodce | genqamdemod, pamdemod, pskdemod, qamdemod, fskdemod |
| demodmap | genqamdemod, pamdemod, pskdemod, qamdemod |
| dmod | Use baseband modulation instead: genqammod, pammod, pskmod, qammod, fskmod |
| dmodce | genqammod, pammod, pskmod, qammod, fskmod |
| modmap | genqammod, pammod, pskmod, qammod for mapping; scatterplot for plotting |
| qaskdeco | qamdemod |
| qaskenco | qammod for mapping; scatterplot for plotting |
| Upgrading from an Earlier Release | Known Software and Documentation Problems | ![]() |
© 1994-2005 The MathWorks, Inc.