Inverse FFT of a matrix
6 ビュー (過去 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!