FFTは、循環プロパティのために、相対周波数0が周波数$ 2 \ pi $と等しくなければならない$ [0,2 \ pi] $の範囲のN点のスペクトルを計算します。これは、例を介して最もよく示されています。 $ 2 \ pi $はサンプリング周波数に対応しています。
Example:
For a length 3 impulse response, say $h=[0.5, 1, 0.5]$, the FFT calculates the spectrum at the relative frequencies $[0, \frac{1}{3}2\pi, \frac{2}{3}2\pi]$, instead of the frequencies $[0, \frac{1}{2}2\pi, 2\pi]$. One way to calculate these frequencies in Matlab for an $N$ points FFT is as follows:
N = 3;
h = [0.5 1 0.5];
fq = linspace(0, 2*pi, N+1);
fq = fq(1:end-1);
H = fft(h);
figure;
plot(fq, abs(H));
関数fftshiftは、スペクトルの右部分を取り、左に置いて、$ [\ frac {2} {3} 2 \ pi、0、\ frac {1} {3} 2 \ pi] $。
fftshift関数を使用せず、$ [0、2 \ pi] $の範囲をプロットするだけで、tの正の時間インデックスを使用することができます。