How to use the fast fourier transform to calculate the output of a transfer function?
조회 수: 33 (최근 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!