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 Center および File ExchangeSimulation, Tuning, and Visualization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by