How to use the fast fourier transform to calculate the output of a transfer function?
41 次查看(过去 30 天)
显示 更早的评论
Hi, I have to calculate Y=X*H in the frequency domain and then taking it back in the time domain. I was trying to do it so:
X = fft(x);
H = ones(1, B);
Y = X*H;
y = ifft(Y);
The issue is that X is a 100x1 colummn vector, H is a 1x100 row vector, and so y is 100x100 matrix while I'd want a vector also for the output. What should I do?
采纳的回答
Honglei Chen
2016-7-26
I assume your X, H, and Y are all in frequency domain? In that case, your H has to match the size of X and it should be a element wise multiplication, not a matrix multiplication, so you need to use .* instead of *. For example,
X = fft(x);
H = ones(size(X));
Y = X.*H;
y = ifft(y);
HTH
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!