Inverse FFT of a matrix
14 次查看(过去 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!