How to use the fast fourier transform to calculate the output of a transfer function?
41 views (last 30 days)
Show older comments
Valerio Marcucci
on 26 Jul 2016
Commented: Valerio Marcucci
on 26 Jul 2016
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?
Accepted Answer
Honglei Chen
on 26 Jul 2016
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
More Answers (0)
See Also
Categories
Find more on Fourier Analysis and Filtering 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!