Using biterr with negative numbers

2 ビュー (過去 30 日間)
Joe Dombroski
Joe Dombroski 2023 年 10 月 31 日
編集済み: Joe Dombroski 2023 年 10 月 31 日
I am tryig to calculate the bit error of a signal with negative values. bitterr will not accept negative values. Is there a trick?
s = -1 + 2*randi([0 1],100,1); % signal of -1 and 1's
n = wgn(100,1,-10); % white gaussian noise variance of -10 dBW
sn=s.*n % signal and noise - this math may be wrong...
[num, ratio]=biterr(s,sn)

回答 (1 件)

John D'Errico
John D'Errico 2023 年 10 月 31 日
編集済み: John D'Errico 2023 年 10 月 31 日
Did I not just answer how to solve essentially the same problem, but in the other direction? Read my answer to your last question. If you have a random sequence that is -1 or 1, can you convert it to the [0,1] sequence that biterr needs to see?
What if you added 1, then divide by 2?
That would map -1 into 0, and 1 back into 1.
  1 件のコメント
Joe Dombroski
Joe Dombroski 2023 年 10 月 31 日
編集済み: Joe Dombroski 2023 年 10 月 31 日
Since I am dealing with a AC signal and noise, I thought that I would need to stay in that polarity. I guess I could use a signal that alternates from 0 to 2 to maintain the signal amplitude and SNR. Then I have to deal with shifting the gausian noise to all positive.

サインインしてコメントする。

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by