Adding noise with certain standard deviation to uncorrupted data
Afficher commentaires plus anciens
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,
Réponse acceptée
Plus de réponses (1)
Jos (10584)
le 6 Fév 2014
Modifié(e) : Jos (10584)
le 6 Fév 2014
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!
Catégories
En savoir plus sur Guidance, Navigation, and Control (GNC) dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!