gaussian white noise with zero mean and 20 db power

11 ビュー (過去 30 日間)
Rajendiran Subramanian
Rajendiran Subramanian 2016 年 9 月 16 日
回答済み: Meg Noah 2025 年 8 月 6 日
how to generate gaussian white noise with zero mean and 20 dB power in Matlab

回答 (1 件)

Meg Noah
Meg Noah 2025 年 8 月 6 日
You also need to define the signal power level to get the order of magnitude.
signalPower = 2; % calculate the signal power from your signal data
nSamples = 1000;
snrDb = 20;
stdNoise = sqrt(signalPower / 10^(snrDb/10));
% generate the gaussian white noise
noiseMean = 0;
noiseValues = stdNoise*randn(nSamples,1) + noiseMean;
% verify the Signal-to-Noise value
noise_power_100_samples = sum(noiseValues.^2)/numel(noiseValues);
SNR = 10*log10(signalPower/noise_power_100_samples);
fprintf(1,"SNR: %f\n", SNR)
SNR: 19.727660
figure()
plot(1:nSamples,noiseValues);
ylabel('20dB Gaussian White Noise')
xlabel('Sample Index')

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by