Inverse FFT of a matrix
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello
I am trying to get the ifft of a S parameter matrix having frequency in the first column and the data in the second column.The code is below:
sp=sparameters('2Port.s2p');
freq=sp.Frequencies;
s=sp.Parameters;
s21=s(2,1,:);
%take s21 seperately
for i = 1:length(freq)
new_s21(i)=s21(:,:,i)
end;
s21_t=transpose(new_s21);
%ifft of S21
impulse_response1=ifft(s21_t);
I am getting a plot of IFFT with the x -axis having values from 0 to 1800 which I am not able to understand.Is the x-axis in seconds?
How to get the ifft() for the freq data that i have?
댓글 수: 0
답변 (1개)
Sulaymon Eshkabilov
2024년 2월 18일
Just looking at your attached figure, it is clear along x axis is time. inverse FFT gives back time domain data from freq domain data.
open('ifft.fig')
댓글 수: 10
Paul
2024년 2월 21일
Sorry, I don't have enought insight into how this is all suppsosed to work. I assume that the variables input and impulse_response1 have the same sampling period. Why is the convolution using abs(impulse_response1), i.e., why the abs? One other issue that you may want to look into is that you might need to use fftsfhift to get the impulse response:
impulse_response1=ifft(s21_t);
and then the corresponding tvec would be:
tvec = ((0:N-1)-floor(N/2))*Ts
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!