How can I add gaussian noise in a specific percentage (e.g. add 5% gaussian noise to a signal)?
10 次查看(过去 30 天)
显示 更早的评论
I have a regular signal in a vector, I want to add 5% gaussian noise to it, anyone got ideas? Thanks
3 个评论
采纳的回答
Image Analyst
2017-4-18
Try this:
period = 20;
t = linspace(-20, 20, 500);
signal = 10*sin(2 * pi * t / period);
noiseSigma = 0.05 * signal;
noise = noiseSigma .* randn(1, length(signal));
noisySignal = signal + noise;
plot(t, noisySignal, 'r.', 'MarkerSize', 10);
hold on;
plot(t, signal, 'b-', 'LineWidth', 3);
grid on;
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/174038/image.png)
5 个评论
kasimala venkatanagaraju
2019-4-6
sir, I want to generate noise contaminated signal with zero mean and standard deviation of 2%. Can you help me how to generate it.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Measurements and Feature Extraction 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!