1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【MATLAB】AWGNで送信するための関数

Posted at
function [ RX ] = AWGNchannel( TX,EbNo,M )
%TX:送信シンボルベクトル
%M=多値数 QPSKなら2,16QAMなら4,64QAMなら6
temp_size = size(TX);
SNR = M*10^(EbNo/10);
No = 1/SNR;
noise = normal_rand(sqrt(No/2),temp_size(1),temp_size(2)) + 1j*normal_rand(sqrt(No/2),temp_size(1),temp_size(2));

RX = TX + noise;

end

function [ output_args ] = normal_rand( sigma,height,width )
%sigma:生成したい正規分布の乱数の標準偏差
    output_args = sigma * randn(height,width);
end
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?