Function File: [num, rate] = biterr (a, b)
Function File: [num, rate] = biterr (…, k)
Function File: [num, rate] = biterr (…, flag)
Function File: [num, rate ind] = biterr (…)

Compares two matrices and returns the number of bit errors and the bit error rate. The binary representations of the variables a and b are treated and a and b can be either:

Both matrices

In this case both matrices must be the same size and then by default the return values num and rate are the overall number of bit errors and the overall bit error rate.

One column vector

In this case the column vector is used for bit error comparison column-wise with the matrix. The returned values num and rate are then row vectors containing the number of bit errors and the bit error rate for each of the column-wise comparisons. The number of rows in the matrix must be the same as the length of the column vector

One row vector

In this case the row vector is used for bit error comparison row-wise with the matrix. The returned values num and rate are then column vectors containing the number of bit errors and the bit error rate for each of the row-wise comparisons. The number of columns in the matrix must be the same as the length of the row vector

This behavior can be overridden with the variable flag. flag can take the value "column-wise", "row-wise" or "overall". A column-wise comparison is not possible with a row vector and visa-versa.

By default the number of bits in each symbol is assumed to be give by the number required to represent the maximum value of a and b. The number of bits to represent a symbol can be overridden by the variable k.

Package: communications