How to insert noise in a signal using matlab?
Show older comments
Hi. I want to create a signal with noise. I found this coding but I don't know how it works. Can somebody explain this to me?
x= cos(2*pi*12*[0:0.001:1.23]);
x(end) = [];
[b a] = butter(2,[0.6 0.7],'bandpass');
filtered_noise = filter(b,a,randn(1, length(x)*2));
x = (x + 0.5*filtered_noise(500:500+length(x)-1))/length(x)*2;
This is the result when I plot the x.

Accepted Answer
More Answers (0)
Categories
Find more on Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
