Clear Filters
Clear Filters

How do I further compute hermitian symmetry IFFT

13 views (last 30 days)
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?

Answers (1)

vidyesh on 22 Feb 2024
Edited: vidyesh on 21 Mar 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
Y = [X(1), X(2:N/2 + 1),conj(fliplr(X(2:N/2)))]; % Manually ensuring conjugate symmetry
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.

Community Treasure Hunt

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

Start Hunting!