Effacer les filtres
Effacer les filtres

What is the difference between mvnrnd and normrnd?

12 vues (au cours des 30 derniers jours)
Mr M.
Mr M. le 13 Mai 2015
I can not find out what is the difference between these two random number generator functions.
  2 commentaires
Rohit Jain
Rohit Jain le 15 Mai 2015
mvnrnd() is the function used to generate pseudo random numbers that follow multi variate normal distribution. mvnrnd() is more for creating correlated random variables normrnd() is the function used to generate pseudo random numbers that follow normal distribution. normrnd() is generally faster than mvnrnd(). For more information on mvnrnd() and normrnd() follow the documentation http://www.mathworks.com/help/stats/mvnrnd.html
Adnane123
Adnane123 le 16 Sep 2015
Modifié(e) : Adnane123 le 16 Sep 2015
Another difference to emphasize here is that if you want to use mvnrnd() for the univariate case you should use the variance directly. For normrnd(), you need to use the standard deviation. Thus, the input for each function should look like: mvnrnd(mean,var) Vs normrnd(mean,sd)

Connectez-vous pour commenter.

Réponse acceptée

Rohit Jain
Rohit Jain le 15 Mai 2015
mvnrnd() is the function used to generate pseudo random numbers that follow multi variate normal distribution. mvnrnd() is more for creating correlated random variables normrnd() is the function used to generate pseudo random numbers that follow normal distribution. normrnd() is generally faster than mvnrnd(). For more information on mvnrnd() and normrnd() follow the documentation http://www.mathworks.com/help/stats/mvnrnd.html

Plus de réponses (1)

Adnane123
Adnane123 le 18 Sep 2015
Another difference to emphasize here is that if you want to use mvnrnd() for the univariate case you should use the variance directly. For normrnd(), you need to use the standard deviation. Thus, the input for each function should look like: mvnrnd(mean,var) Vs normrnd(mean,sd)

Community Treasure Hunt

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

Start Hunting!

Translated by