How to add AWGN noise using randn function?

6 ビュー (過去 30 日間)
Afaq Ahmad
Afaq Ahmad 2021 年 1 月 13 日
回答済み: Aastha 2025 年 6 月 12 日
I have a discrete time signal which I generated as follows:
I wish to add AWGN noise using randn() function with mean=0 and variance=0, 0.1, 0.5, 1, 1.5 and 3.
The code i have written is:
How can I modify my function to add the noise and later on, demodulate it back into a matrix (as shown in 'w' array)?

回答 (1 件)

Aastha
Aastha 2025 年 6 月 12 日
To add AWGN noise using the "randn" function in MATLAB, you can follow the steps outlined below:
1. The "randn" function in MATLAB generates samples from a standard normal distribution, which has a mean of 0 and a variance of 1.
You may refer to MathWorks documentation of "randn" function for any queries on it:
2. To add AWGN noise with a specified variance "v", you can scale the output of "randn" using the square root of the variance. You may refer to the MATLAB code snippet below to do so:
awgn_noise = sqrt(v).*randn(); % N(0,v)
I hope this helps!

カテゴリ

Help Center および File ExchangePropagation and Channel Models についてさらに検索

製品


リリース

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by