What is the difference between mvnrnd and normrnd?

조회 수: 11 (최근 30일)
Mr M.
Mr M. 2015년 5월 13일
답변: Adnane123 2015년 9월 18일
I can not find out what is the difference between these two random number generator functions.
  댓글 수: 2
Rohit Jain
Rohit Jain 2015년 5월 15일
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 2015년 9월 16일
편집: Adnane123 2015년 9월 16일
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)

댓글을 달려면 로그인하십시오.

채택된 답변

Rohit Jain
Rohit Jain 2015년 5월 15일
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

추가 답변 (1개)

Adnane123
Adnane123 2015년 9월 18일
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)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by