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

13 次查看(过去 30 天)
Hi,
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)));
figure(1)
plot(t,sig,'-r');
hold on;
plot(t,noise,'-b')
plot(t,sig_ns_conv,'-g');
hold off;

采纳的回答

Matt J
Matt J 2021-12-3
sig_ns_conv = (ifft(fft(sig) .* fft(noise))) * dt;
  6 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by