How do I further compute hermitian symmetry IFFT
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
vidyesh
am 22 Feb. 2024
Bearbeitet: vidyesh
am 21 Mär. 2024
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 Kommentare
Siehe auch
Kategorien
Mehr zu Simulation, Tuning, and Visualization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!