add Gaussian distributed noise

7 ビュー (過去 30 日間)
Abdullah Ibrahim
Abdullah Ibrahim 2022 年 9 月 12 日
編集済み: Chris 2022 年 9 月 12 日
How to add Gaussian distributed noise with zero mean and standard deviation of 0.1 ?

回答 (1 件)

Chris
Chris 2022 年 9 月 12 日
編集済み: Chris 2022 年 9 月 12 日
  2 件のコメント
Abdullah Ibrahim
Abdullah Ibrahim 2022 年 9 月 12 日
I have been using it but not showing the same results
Chris
Chris 2022 年 9 月 12 日
編集済み: Chris 2022 年 9 月 12 日
The same results as what?
If you want the distribution to be the same each run, you will need to seed the random number generator.
figure
tiledlayout(1,2)
s = rng;
r1 = normrnd(0,.1,50000,1);
nexttile
histogram(r1)
rng(s)
r2 = normrnd(0,.1,50000,1);
nexttile
histogram(r2)

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

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by