How we can generate generate a noise signal from gauss distribution ??

41 ビュー (過去 30 日間)
ABTJ
ABTJ 2020 年 2 月 9 日
コメント済み: Sean Corby 2021 年 3 月 16 日
I want to generate a noise signal from gauss distribution ,whose mean is 'x' and variance is 'y'
Which formula and command should i use?

採用された回答

Thiago Henrique Gomes Lobato
Thiago Henrique Gomes Lobato 2020 年 2 月 9 日
the randn function in matlab is a gaussian distribution with variance 1. So you can generate a gaussian with mean x and variance y as:
Samples = 10;
Noise = x+randn(Samples,1)*y;
  5 件のコメント
Thiago Henrique Gomes Lobato
Thiago Henrique Gomes Lobato 2020 年 2 月 9 日
Sure, but what you actually want to see? Distribution shapes cannot be seen if you just plot the data, you need to plot the probability of the data, which is roughly the histogram counts times a constant. If you want that your noise data have a bell shape than you actually don't want a gaussian noise, but rather a signal that looks like a gaussian.
Sean Corby
Sean Corby 2021 年 3 月 16 日
Why does MATLAB show random values that appear to go beyond the variance?

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

その他の回答 (1 件)

Chuguang Pan
Chuguang Pan 2020 年 2 月 9 日
This is a example for generating a bivariate normal distribusion which is a duplicate of MATLAB Documentation. Maybe it can help you.
Generate values from a bivariate normal distribution with specified mean vector and covariance matrix.
mu = [1 2]; %mean vector
sigma = [1 0.5; 0.5 2]; %covariance matrix
R = chol(sigma);
z = repmat(mu,10,1) + randn(10,2)*R
Here is the result. Maybe you will get a different result because of random.
z =
1.3271 3.3688
2.0826 3.3279
2.0061 2.9663
0.3491 3.3285
1.2571 3.3585
0.0556 1.8450
-0.3218 0.4258
1.9248 1.6005
1.0000 3.5770
0.9451 -0.1597
  1 件のコメント
ABTJ
ABTJ 2020 年 2 月 9 日
If we plot this Noise, will it have a bell shape??

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

製品


リリース

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by