How do I further compute hermitian symmetry IFFT

조회 수: 15 (최근 30일)
Marcin Kolacz
Marcin Kolacz 2021년 1월 17일
편집: vidyesh 2024년 3월 21일
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?

답변 (1개)

vidyesh
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
ans = 1×7 logical array
1 1 1 1 1 1 1
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.

카테고리

Help CenterFile Exchange에서 Simulation, Tuning, and Visualization에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by