Skip to main content
added 65 characters in body
Source Link
Matt L.
  • 92.4k
  • 10
  • 81
  • 184

The sequence is exactly what you should expect:

$$x[-n]=x[N-n]\tag{1}$$

Clearly, for $n=0$ $x[n]$ and $x[-n]$ have the same value.

It seems like you were expecting to see the sequence $x[N-1-n]$ instead of $x[N-n]$. If you wanted that sequence you would need to modulate the result of the first DFT:

N = 16;
x = 1:N;
c = exp(-1i*2*pi/N*(0:N-1));
x2 = real( fft( ( fft(x) .* c ) ) ) / N;    % real() just to remove rounding errors
x2 =

  16  15  14  13  12  11  10  9  8  7  6  5  4  3  2  1

The sequence is exactly what you should expect:

$$x[-n]=x[N-n]\tag{1}$$

Clearly, for $n=0$ $x[n]$ and $x[-n]$ have the same value.

It seems like you were expecting to see the sequence $x[N-1-n]$ instead of $x[N-n]$. If you wanted that sequence you would need to modulate the result of the first DFT:

N = 16;
x = 1:N;
c = exp(-1i*2*pi/N*(0:N-1));
x2 = real( fft( ( fft(x) .* c ) ) ) / N;    % real() just to remove rounding errors

The sequence is exactly what you should expect:

$$x[-n]=x[N-n]\tag{1}$$

Clearly, for $n=0$ $x[n]$ and $x[-n]$ have the same value.

It seems like you were expecting to see the sequence $x[N-1-n]$ instead of $x[N-n]$. If you wanted that sequence you would need to modulate the result of the first DFT:

N = 16;
x = 1:N;
c = exp(-1i*2*pi/N*(0:N-1));
x2 = real( fft( ( fft(x) .* c ) ) ) / N;    % real() just to remove rounding errors
x2 =

  16  15  14  13  12  11  10  9  8  7  6  5  4  3  2  1
added 235 characters in body
Source Link
Matt L.
  • 92.4k
  • 10
  • 81
  • 184

The sequence is exactly what you should expect:

$$x[-n]=x[N-n]\tag{1}$$

Clearly, for $n=0$ $x[n]$ and $x[-n]$ have the same value.

It seems like you were expecting to see the sequence $x[N-1-n]$ instead of $x[N-n]$. If you wanted that sequence you would need to modulate the result of the first DFT:


N = 16;
x = 1:N;
c = exp(-1i*2*pi/N*(0:N-1));
x2 = real( fft( ( fft(x) .* c ) ) ) / N;    % real() just to remove rounding errors

The sequence is exactly what you should expect:

$$x[-n]=x[N-n]\tag{1}$$

Clearly, for $n=0$ $x[n]$ and $x[-n]$ have the same value.

It seems like you were expecting to see the sequence $x[N-1-n]$ instead of $x[N-n]$.

The sequence is exactly what you should expect:

$$x[-n]=x[N-n]\tag{1}$$

Clearly, for $n=0$ $x[n]$ and $x[-n]$ have the same value.

It seems like you were expecting to see the sequence $x[N-1-n]$ instead of $x[N-n]$. If you wanted that sequence you would need to modulate the result of the first DFT:


N = 16;
x = 1:N;
c = exp(-1i*2*pi/N*(0:N-1));
x2 = real( fft( ( fft(x) .* c ) ) ) / N;    % real() just to remove rounding errors
Source Link
Matt L.
  • 92.4k
  • 10
  • 81
  • 184

The sequence is exactly what you should expect:

$$x[-n]=x[N-n]\tag{1}$$

Clearly, for $n=0$ $x[n]$ and $x[-n]$ have the same value.

It seems like you were expecting to see the sequence $x[N-1-n]$ instead of $x[N-n]$.