cmp_bits
Alignment of 2 bits vectors and counting the number of errors
Calling sequence
[b1,b2[,nerr,ber]] = cmp_bits(b1,b2);
[b1,b2[,nerr,ber]] = cmp_bits(b1,b2,'p',k); // Try to solve phase ambiguity (2^k-PSK)
[b1,b2[,nerr,ber]] = cmp_bits(b1,b2); [b1,b2[,nerr,ber]] = cmp_bits(b1,b2,'p',k); // Try to solve phase ambiguity (2^k-PSK)
Parameters
- b1:
First bits vector (as output: realigned with b2)
- b2:
Second bits vector (as output: realigned with b1)
- nerr:
Number of errors (in bits) between the 2 realigned vectors
- ber:
Bit Error Rate
First bits vector (as output: realigned with b2)
Second bits vector (as output: realigned with b1)
Number of errors (in bits) between the 2 realigned vectors
Bit Error Rate
Description
Try to find the best correlation between the 2 bit vectors and count the number of errors (ignoring the 2 first bits and 2 last bits).
Example
b1 = [0 1 0 0 0 1]; b2 = [1 0 0 0 1]; [b1,b2,nerr,ber] = cmp_bits(b1,b2); |