add noise
5 次查看(过去 30 天)
显示 更早的评论
How can i add some noise to a signal that i had already defined its equation?
0 个评论
采纳的回答
Wayne King
2012-3-9
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!