convolving signal and noise in frequency domain and inverting back to time domain

11 views (last 30 days)
Januka Attanayake
Januka Attanayake on 3 Dec 2021
Commented: Matt J on 5 Dec 2021
I'm convolving time series data (a signal and noise) in frequency domain and inverting the convolved time series back to time domain. This seems like a straight forward operation with an fft and ifft. Yet when I do this, the resulting final time series appears to be amplified by some factor. Any explanation about how I can fix this is greatly appreciated.
f = 2;
omega = 2*pi*f;
dt = 0.01;
t = 0:dt:5;
sig = sin(omega*t) * 2;
noise = randi([-1,1],1,length(t));
sig_ns_conv = (ifft(fft(sig) .* fft(noise)));
hold on;
hold off;

Accepted Answer

Matt J
Matt J on 3 Dec 2021
sig_ns_conv = (ifft(fft(sig) .* fft(noise))) * dt;

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!