How to generate gaussian white noise with variable variance

9 ビュー (過去 30 日間)
snake eyes
snake eyes 2011 年 8 月 5 日
Someone please tell me, how can I generate Gaussian white noise with variable variance. If possible give me equation and also source code.
Thanks in advance.

採用された回答

Daniel Shub
Daniel Shub 2011 年 8 月 5 日
It is not clear what do you mean by variable variance. If you want a bunch of random numbers all with the same variance, but you want to be able to specify the variance sigma2:
randn(1, 0, sigma2);
If you want a set of random variable, with each coming from a distribution with a different sgima
sigma.*randn(size(sigma));

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRandom Number Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by