How to add a noise in my Input graph?

10 ビュー (過去 30 日間)
Maham Arooj
Maham Arooj 2020 年 8 月 13 日
コメント済み: hosein Javan 2020 年 8 月 13 日
I have a input signal and i want to add noise to it with zero mean, variance of deviation = 1, sampling time is 600 and maxi deviation (%) is 15. Kindly help?

採用された回答

hosein Javan
hosein Javan 2020 年 8 月 13 日
編集済み: hosein Javan 2020 年 8 月 13 日
this code gives a zero mean noise with a sampling rate equal to your signal. just calculate it's amplitude by knowing variance.
t = linspace(0,2*pi,100);
x = sin(t);
an = 0.2; % noise amplitude
noise = an*(rand(size(x))-0.5);
plot(t,x,'r','linewidth',1)
hold on
plot(t, x+noise)
  6 件のコメント
Maham Arooj
Maham Arooj 2020 年 8 月 13 日
Thank you Sir...
hosein Javan
hosein Javan 2020 年 8 月 13 日
you're welcome.

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

その他の回答 (1 件)

Adam Danz
Adam Danz 2020 年 8 月 13 日
編集済み: Adam Danz 2020 年 8 月 13 日
will return an array of random values from a standard normal distribution with mean=0 and variance=1. The array will be the same size as your signal. However, the max value has a very low probability that it will be greater than ~6. Remember that with standard normal distributions, 99.9% of all values are within +/- 3 from the mean.

カテゴリ

Help Center および File ExchangeDetection についてさらに検索

製品


リリース

R2011a

Community Treasure Hunt

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

Start Hunting!

Translated by