开发者

modem.oqpskmod for BER

hi can anyone show how to use the modem.oqpskmod for BER. thanks!

    h = modem.oqpskmod
    y = modulate(h, values);
    g = modem.oqpskdemod(h)
    z = demodulate(g, y)

let's assume that i have array called values which contains only 1s and 0s. my question is how would i calc开发者_JS百科ulate BER? of course if above my code is correct.


Based on this Wikipedia page, you simply have to compute the number of incorrect bits and divide by the total number of transferred bits to get the bit error rate (BER). If values is the unmodulated input signal and z is the output signal after modulation and demodulation, you can compute it like this:

BER = sum(logical(values(:)-z(:)))/numel(values);

EDIT: I modified the above code just in case you run into two situations:

  • If z has values other than 0 and 1.
  • If z is a different size than values (i.e. row vector versus column vector).

I don't know if you are ever likely to come across these two situations, but better safe than sorry. ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜