Prev: A begginer's question - ButtonDownFcn
Next: load figure and then save with original figure's color??
From: Bruno Luong on 27 May 2010 14:03 Walter Roberson <roberson(a)hushmail.com> wrote in message <htjukj$giq$1(a)canopus.cc.umanitoba.ca>... > Bruno Luong wrote: > > Anyone <""Zrqt\"@³@Qi§QUm![§H:\"&z25u/g`MpEr)\"{ETq[opZ\"Vz.az?"> wrote > > in message <4bfd77cd$0$32006$c3e8da3(a)news.astraweb.com>... > > >> >> mean(randn(100000000,1)) > > > Did someone mention this is a rich and slow way of doing > >>> randn/10000 > > No it isn't. By the Law Of Large Numbers, mean(randn(N,1)) for large N will > have a much lower mean and standard deviation than randn(1,1)/sqrt(N) will. Yes, of course it is! It is a well known that linear map of Gaussian multivariate vectors is an Gaussian. For the map X -> Y=L*X, where L is any matrix, and the expectation and the variance of Y can be computed according to the formulas: 1) E(Y) = L*E(X); 2) E(Y*Y') = L*E(X*X)'*L'. Let X = (X1, ..., Xn) where Xi ~ N(0,1) and and {Xi} are independent; in other word E(X*X') = eye(n). For Yn the "mean" of X, i.e.: Yn := (1/n, .., 1/n) * X, then E(Y) = L*0 = 0 E(Y*Y') = n*(1/n^2) = 1/n. So Y is Gaussian having 0-mean and standard deviation = sqrt(E(Y^2)) = 1/sqrt(n). This formula is exact, not approximate. This is fortunately 100% compatible with the Central Limit Theorem. Indeed, according to: http://en.wikipedia.org/wiki/Central_limit_theorem Zn := (X1 + ... + Xn)/sqrt(n) -> N(0,1) Because Zn is Yn*sqrt(n); Yn must have standard deviation ~ 1/sqrt(n) for n -> infinity. Yn can't have standard deviation "much lower" than 1/sqrt(n) as you claimed Walter. Bruno
From: David Young on 27 May 2010 14:12 "Artur Artur" <arturracu(a)yahoo.com> wrote in message <htk44c$4fq$1(a)fred.mathworks.com>... > ... > ok merci for this...but finaly how can i generate a white gaussian noise in matlab version 2009, becouse in this version i don't have the function WGN or AWGN > ... Well I guess my original answer got lost in the noise, but it's still valid: use randn.
First
|
Prev
|
Pages: 1 2 3 4 5 6 Prev: A begginer's question - ButtonDownFcn Next: load figure and then save with original figure's color?? |