How do I further compute hermitian symmetry IFFT
17 次查看(过去 30 天)
显示 更早的评论
Hi,
I want to ask what's the difference between computing IFFT from a hermitian-symmetrical complex matrix, when
1st matrix (lets call it X) is created by making a matrix [0, x, 0, fliplr(conj(x)] and then simply -> ifft(X)
2nd matrix (also X) is just computed by adding 'symmetric' flag to ifft -> ifft(X,'symmetric')
The 1st output is longer (twice + 2 zeroes) and I have no idea how to process the signal further.
Which method performs better?
0 个评论
回答(1 个)
vidyesh
2024-2-22
编辑:vidyesh
2024-3-21
Hi Marcin,
I understand you're interested in the differences between manually constructing a Hermitian-symmetrical matrix for an IFFT and utilizing MATLAB's 'symmetric' flag within the ifft function.
The "ifft(X, 'symmetric')" function treats the input 'X' as if it were conjugate symmetric by effectively disregarding the latter half of its elements. This is because a function 'g(a)' is conjugate symmetric if 'g(a) = g*(−a)'.
But in the context of the Fourier transform of a time-domain signal, one half of the spectrum represents positive frequencies, and the other half represents negative frequencies, with the first element corresponding to the zero frequency.
Here's an example to illustrate this:
X = rand(1,7);
a = ifft(X, 'symmetric'); % MATLAB enforces conjugate symmetry
N = numel(X);
% First element is same
if mod(N,2)
Y = [X(1), X(2:(N+1)/2), conj(fliplr(X(2:(N+1)/2)))]; % Manually ensuring conjugate symmetry
else
Y = [X(1), X(2:N/2 + 1),conj(fliplr(X(2:N/2)))]; % Manually ensuring conjugate symmetry
end
b = ifft(Y);
a == b % This should return true if both methods are equivalent
For more in-depth information on the ifft function and its 'symmetric' option, you can refer to the MATLAB documentation page:
Note that if 'X' is complex, then consider only the real part of 'b' in comparison.
Hope this helps.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulation, Tuning, and Visualization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!