Products & Services Solutions Academia Support User Community Company

Learn more about Communications Toolbox   

bsc - Model binary symmetric channel

Syntax

ndata = bsc(data,p)
ndata = bsc(data,p,s)
ndata = bsc(data,p,state)
[ndata,err] = bsc(...)

Description

ndata = bsc(data,p) passes the binary input signal data through a binary symmetric channel with error probability p. The channel introduces a bit error with probability p, processing each element of data independently. data must be an array of binary numbers or a Galois array in GF(2). p must be a scalar between 0 and 1.ndata = bsc(data,p,s) causes rand to use the random stream s. s is any valid random stream. See RandStream for more details.

ndata = bsc(data,p,state) resets the state of the uniform random number generator rand to the integer state.

[ndata,err] = bsc(...) returns an array, err, containing the channel errors.

This function uses, by default, the Mersenne Twister algorithm by Nishimura and Matsumoto.

Examples

To introduce bit errors in the bits in a random matrix with probability 0.15, use the bsc function:

z = randint(100,100); % Random matrix
nz = bsc(z,.15); % Binary symmetric channel
[numerrs, pcterrs] = biterr(z,nz) % Number and percentage of errors

The output below is typical. The percentage of bit errors is not exactly 15% in most trials, but it is close to 15% if the size of the matrix z is large.

numerrs =

        1509


pcterrs =

    0.1509

Another example using this function is in Binary Symmetric Channel.

See Also

rand, awgn, Binary Symmetric Channel

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS