This command generates a normaly distributed random number with zero mean and variance equals to 1. How do I modify the variance of the command? thanks Rene Bartar __________________________________________________________________________ Acabe com aquelas janelinhas que pulam na sua tela. AntiPop-up UOL - gris! http://antipopup.uol.com.br/ |
|
randn command
Started by ●July 4, 2004
Reply by ●July 5, 20042004-07-05
You have to do following
transformation:
x = sigma*x' + mu;
the new random variable x' will have the
required mean and variance.
Warm Regards,
Manish
|
Reply by ●July 5, 20042004-07-05
Multiply it's results by the variance that you want. --- Rene Bartar <> wrote: > This command generates a normaly distributed random > number with zero mean and variance equals to 1. How > do > I modify the variance of the command? > > thanks > Rene Bartar __________________________________________________________________________ > Acabe com aquelas janelinhas que pulam na sua tela. > AntiPop-up UOL - gris! > http://antipopup.uol.com.br/ > > ===== Juan I. Arvelo, Jr., Ph.D. Johns Hopkins University 11100 Johns Hopkins Rd. Laurel, MD 20723 240.228.4293 __________________________________ |
Reply by ●July 5, 20042004-07-05
Rene,
You first run randn()command to obtain the random sequency with zero
mean and variance = 1, then multiply this sequence by the square root of
the variance, which gives the desired output.
Rene Bartar <r...@bol.com.br> wrote: This command generates a normaly distributed random
|
Reply by ●July 6, 20042004-07-06
A small correction, the result of the randn command should be multiplied
by the square root of the desired variance (i.e. multiply with the standard deviation). -Deepak - To know that we know what we know, and that we do not know what we do not know, that is true knowledge. - Confucius (551-479 B.C.). - ----- Original Message ----- From: "Juan I. Arvelo, Jr., Ph.D." <> To: "Rene Bartar" <>; "matlab" <> Sent: Monday, July 05, 2004 8:05 PM Subject: Re: [matlab] randn command > Multiply it's results by the variance that you want. > > --- Rene Bartar <> wrote: > > This command generates a normaly distributed random > > number with zero mean and variance equals to 1. How > > do > > I modify the variance of the command? > > > > thanks > > Rene Bartar > > > > > __________________________________________________________________________ > > Acabe com aquelas janelinhas que pulam na sua tela. > > AntiPop-up UOL - gris! > > http://antipopup.uol.com.br/ > > > > > > > > > > ===== > Juan I. Arvelo, Jr., Ph.D. > Johns Hopkins University > 11100 Johns Hopkins Rd. > Laurel, MD 20723 > 240.228.4293 > > __________________________________ > > > _____________________________________ > Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. > > _____________________________________ > About this discussion group: > > To Join: > > To Post: > > To Leave: > > Archives: http://www.yahoogroups.com/group/matlab > > More DSP-Related Groups: http://www.dsprelated.com/groups.php3 > Yahoo! Groups Links |