Adding noise with certain standard deviation to uncorrupted data

53 ビュー (過去 30 日間)
Deepayan Bhadra
Deepayan Bhadra 2014 年 2 月 6 日
編集済み: Jos (10584) 2014 年 2 月 6 日
Hello,
I have a 1-D data set and I want to artificially corrupt it with noise of a certain standard deviation. Say for accurate pitch rate measurements 'q' of an aircraft, I want to add noise with a std. of 0.1047 rad/sec. How do I proceed?
Regards,

採用された回答

Wayne King
Wayne King 2014 年 2 月 6 日
when you say 0.1047 rad/second, do you want these values to be bounded by a certain interval? or is the frequency value continuous (I'm assuming it is by rad/sec)
The other question is what probability distribution do you want the noise to follow and what is the mean value?
I'll assume here: Gaussian, mean 0, std 0.1047, frequency continuous
noise = 0.1047*randn(1000,1); % gives you 1000 samples
Note you get negative and positive rad/second values -- that may very well not be what you want.

その他の回答 (1 件)

Jos (10584)
Jos (10584) 2014 年 2 月 6 日
編集済み: Jos (10584) 2014 年 2 月 6 日
In addition to Wayne's suggestion you can sample noise from any distribution with unknown parameters and set the standard deviation to a specific value:
DesiredSD = 0.1047 ; % the desired standard deviation
noise = random('ncx2',10*rand,10*rand,[1000 1]) ; % some random noise
noise = DesiredSD * (noise ./ std(noise)) ; % scale the standard deviation
std(noise) % voila!

カテゴリ

Help Center および File ExchangeVerification, Validation, and Test についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by