How to compute a gaussian random noise with Matlab R2010a ?

1 回表示 (過去 30 日間)
Adrien
Adrien 2013 年 5 月 30 日
How to compute a gaussian random noise with Matlab R2010a ? I saw "normrnd" for Matlab 2013 but it des not exist in Matlab 2010. Another solution?
  2 件のコメント
José-Luis
José-Luis 2013 年 5 月 30 日
What does "compute" mean?
Adrien
Adrien 2013 年 5 月 30 日
I mean, I want to add noise to simulated data, hence I need to create a vector of length N with gaussianly-distributed data.

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

採用された回答

Iain
Iain 2013 年 5 月 30 日
If you mean generate random numbers in a gaussian distribution, whats wrong with randn()?

その他の回答 (2 件)

Adrien
Adrien 2013 年 5 月 30 日
As far as a see randn() is centered around 0.5 (this is not a pproblem) but is limited between 0 and 1, isn't it: it never gives any negative or >1 numbers, hence randn() seems to be a "truncated gaussian". I would like a "non-truncated" one if it exists.
  1 件のコメント
Iain
Iain 2013 年 5 月 30 日
You're looking at rand, which is top hat 0 to 1. randn is gaussian, with mean 0 and sigma of 1.

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


Adrien
Adrien 2013 年 5 月 30 日
Mea culpa I had written "rand" instead of "randn" (even if I had read "randn"), so thanks the problem seems to be solved ;)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by