Hi. How can i add 20% Gaussian noise to some fixed value vector.

3 ビュー (過去 30 日間)
Fiaz Ahmad
Fiaz Ahmad 2016 年 3 月 13 日
コメント済み: Fiaz Ahmad 2016 年 3 月 14 日
Suppose i have a fixed value vector [1.05;0.2561;.3321]). I want to add 20% Gaussain noise to this vector such that this vector become the mean of the Gaussian distribution.
I hope that the question is clear
Thanks
  2 件のコメント
John D'Errico
John D'Errico 2016 年 3 月 13 日
No, it is not clear. 20% noise suggests that you do not actually want classical additive Gaussian noise, but proportional noise.
Fiaz Ahmad
Fiaz Ahmad 2016 年 3 月 13 日
Hi Thanks John.
Actually i have the vector give above. Now what i want is to take this vector as mean and vary this randomly. The random variation is to be Gaussian 20% around the mean.

サインインしてコメントする。

採用された回答

Rick Rosson
Rick Rosson 2016 年 3 月 14 日
m = [ 1.05 ; 0.2561 ; 0.3321 ];
s = 0.2 * m ;
N = 1000;
x = ones(N,1) * m' + randn(N,3) * diag(s);
  1 件のコメント
Fiaz Ahmad
Fiaz Ahmad 2016 年 3 月 14 日
Thanks Rick it solved the problem

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by