How to compute a gaussian random noise with Matlab R2010a ?

3 vues (au cours des 30 derniers jours)
Adrien
Adrien le 30 Mai 2013
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 commentaires
José-Luis
José-Luis le 30 Mai 2013
What does "compute" mean?
Adrien
Adrien le 30 Mai 2013
I mean, I want to add noise to simulated data, hence I need to create a vector of length N with gaussianly-distributed data.

Connectez-vous pour commenter.

Réponse acceptée

Iain
Iain le 30 Mai 2013
If you mean generate random numbers in a gaussian distribution, whats wrong with randn()?

Plus de réponses (2)

Adrien
Adrien le 30 Mai 2013
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 commentaire
Iain
Iain le 30 Mai 2013
You're looking at rand, which is top hat 0 to 1. randn is gaussian, with mean 0 and sigma of 1.

Connectez-vous pour commenter.


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

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by