add noise
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How can i add some noise to a signal that i had already defined its equation?
0 Kommentare
Akzeptierte Antwort
Wayne King
am 9 Mär. 2012
You can use randn()
t = 0:0.001:1;
x = cos(2*pi*100*t);
y = x+randn(size(t));
Of course that assumes you want N(0,1) additive noise. If you want zero-mean Gaussian white noise with a different variance, then use
y = x+sqrt(var_value)*randn(size(t));
where var_value is the variance you want.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!