How can I add a 0db noise to my randomly generated data?

조회 수: 1 (최근 30일)
fadams18
fadams18 2020년 9월 8일
답변: Hiro Yoshino 2020년 9월 8일
I simulated some random data and wish to add different db levels of noise to the data below
n = 5000;
m = 5000;
r =5;
Wtheo = 10*rand(m,r);
Htheo = 10*rand(r,n);
X = Wtheo*Htheo; % Synthetic Data
N = 7.5*randn(m,n);
SNR = snr(X,N); % this gives me an SNR of 25db.
% How do I get 0 db? Is there a better way to do this?
data = X + N;

답변 (1개)

Hiro Yoshino
Hiro Yoshino 2020년 9월 8일
why don't you use awgn?
you can basically add whatever you want.

카테고리

Help CenterFile Exchange에서 Random Number Generation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by