help biterr
时间: 2023-12-07 20:04:59 浏览: 41
在MATLAB中,输入`help biterr`可以获取biterr函数的帮助文档,包括语法和参数说明。下面是biterr函数的帮助文档:
```
ERR = biterr(X,Y) returns the number of bit errors and the bit error rate for two binary inputs, X and Y. X and Y must have the same number of columns.
ERR = biterr(X,Y,N) returns the number of bit errors and the bit error rate based on N bits for two binary inputs, X and Y. N must be a positive integer.
ERR = biterr(X,Y,N,FLG) returns the number of bit errors and the bit error rate based on N bits for two binary inputs, X and Y. Use FLG to specify whether biterr treats the inputs as packed binary data.
ERR = biterr(X,Y,POS) returns the number of bit errors and the bit error rate for two binary inputs, X and Y, based on the bits specified in POS. POS is a vector of indices to the bits to compare.
ERR = biterr(X,Y,N,FLG,POS) returns the number of bit errors and the bit error rate for two binary inputs, X and Y, based on the bits specified in POS. Use FLG to specify whether biterr treats the inputs as packed binary data.
The bit error rate is the number of bit errors divided by the total number of bits in X or Y. The number of bit errors is the Hamming distance between the two binary vectors.
The arguments N and FLG are optional. If N is not specified, biterr uses the total number of bits in X or Y. If FLG is not specified, biterr treats X and Y as individually coded binary data. If POS is not specified, biterr compares all bits in X and Y.
You can also use biterr to compare a binary vector to a scalar. In this case, biterr expands the scalar to a vector of zeros and ones with the same length as the binary vector.
Class support for inputs X,Y,N,FLG,and POS:
All inputs must be of the same numeric class or logical. They can be any combination of the following classes:
- logical
- single
- double
- int8, uint8, int16, uint16, int32, uint32, int64, uint64
- fi (Fixed-Point Designer)