Skip to main content
edited body
Source Link
Marcus Müller
  • 34.4k
  • 4
  • 37
  • 64

Let's define the N-point IDFT $y[n]$ of a signal $Y[f]$ as

$$\begin{align*} y[n] &= \sum\limits_{n=0}^{N-1} Y[f] e^{j2\pi n\,\frac{f}{N}},& n\in \{0,\dots,N-1 \} \end{align*}$$$$\begin{align*} y[n] &= \sum\limits_{f=0}^{N-1} Y[f] e^{j2\pi n\,\frac{f}{N}},& n\in \{0,\dots,N-1 \}\tag{1} \end{align*}$$ The DCT-II (which is most probably what we're looking at; the others are mathematically useful, but less nice to implement) $\mathbf{Y}[f]$:

$$\begin{align*} \mathbf{Y}[f] &= \sum\limits_{n=0}^{N-1} y[n] \cos\left(\pi (k+\frac12) \frac nN \right) ,& f\in \{0,\dots,N-1\}\tag{1} \\ &\text{which, Euler says, is}\\ &= \sum\limits_{n=0}^{N-1} y[n]\left(e^{j\pi (k+\frac12) \frac nN } + e^{-j\pi (k+\frac12) \frac nN }\right),& f\in \{0,\dots,N-1\}\text.\tag{2} \end{align*}$$$$\begin{align*} \mathbf{Y}[f] &= \sum\limits_{n=0}^{N-1} y[n] \cos\left(\pi (k+\frac12) \frac nN \right) ,& f\in \{0,\dots,N-1\}\\ &\text{which, Euler says, is}\\ &= \frac12 \sum\limits_{n=0}^{N-1} y[n]\left(e^{j\pi (k+\frac12) \frac nN } + e^{-j\pi (k+\frac12) \frac nN }\right),& f\in \{0,\dots,N-1\}\text.\tag{2} \end{align*}$$

Now, calculating the inverse discrete Fourier of the discrete cosine transform becomes but a matter of diligence; calculating by inserting $(2)$ into $(1)$, you'll notice that the complex sinusoids are orthogonal w.r.t. the scalar product, ie. the sum over the element-wise products becomes zero for everything but the same exponents.

Let's define the N-point IDFT $y[n]$ of a signal $Y[f]$ as

$$\begin{align*} y[n] &= \sum\limits_{n=0}^{N-1} Y[f] e^{j2\pi n\,\frac{f}{N}},& n\in \{0,\dots,N-1 \} \end{align*}$$ The DCT-II (which is most probably what we're looking at; the others are mathematically useful, but less nice to implement) $\mathbf{Y}[f]$:

$$\begin{align*} \mathbf{Y}[f] &= \sum\limits_{n=0}^{N-1} y[n] \cos\left(\pi (k+\frac12) \frac nN \right) ,& f\in \{0,\dots,N-1\}\tag{1} \\ &\text{which, Euler says, is}\\ &= \sum\limits_{n=0}^{N-1} y[n]\left(e^{j\pi (k+\frac12) \frac nN } + e^{-j\pi (k+\frac12) \frac nN }\right),& f\in \{0,\dots,N-1\}\text.\tag{2} \end{align*}$$

Now, calculating the inverse discrete Fourier of the discrete cosine transform becomes but a matter of diligence; calculating by inserting $(2)$ into $(1)$, you'll notice that the complex sinusoids are orthogonal w.r.t. the scalar product, ie. the sum over the element-wise products becomes zero for everything but the same exponents.

Let's define the N-point IDFT $y[n]$ of a signal $Y[f]$ as

$$\begin{align*} y[n] &= \sum\limits_{f=0}^{N-1} Y[f] e^{j2\pi n\,\frac{f}{N}},& n\in \{0,\dots,N-1 \}\tag{1} \end{align*}$$ The DCT-II (which is most probably what we're looking at; the others are mathematically useful, but less nice to implement) $\mathbf{Y}[f]$:

$$\begin{align*} \mathbf{Y}[f] &= \sum\limits_{n=0}^{N-1} y[n] \cos\left(\pi (k+\frac12) \frac nN \right) ,& f\in \{0,\dots,N-1\}\\ &\text{which, Euler says, is}\\ &= \frac12 \sum\limits_{n=0}^{N-1} y[n]\left(e^{j\pi (k+\frac12) \frac nN } + e^{-j\pi (k+\frac12) \frac nN }\right),& f\in \{0,\dots,N-1\}\text.\tag{2} \end{align*}$$

Now, calculating the inverse discrete Fourier of the discrete cosine transform becomes but a matter of diligence; calculating by inserting $(2)$ into $(1)$, you'll notice that the complex sinusoids are orthogonal w.r.t. the scalar product, ie. the sum over the element-wise products becomes zero for everything but the same exponents.

added 529 characters in body
Source Link
Marcus Müller
  • 34.4k
  • 4
  • 37
  • 64

Let's define the N-point DFTIDFT $Y(f)$$y[n]$ of a signal $y[n]$$Y[f]$ as

$$\begin{align*} Y[f] &= \sum\limits_{n=0}^{N-1} y[n] e^{j2\pi f\,\frac{n}{N}},& f\in \{0,\dots,N-1 \} \end{align*}$$$$\begin{align*} y[n] &= \sum\limits_{n=0}^{N-1} Y[f] e^{j2\pi n\,\frac{f}{N}},& n\in \{0,\dots,N-1 \} \end{align*}$$ The DCT-II (which is most probably what we're looking at; the others are mathematically useful, but less nice to implement) $\mathbf{Y}[f]$:

$$\begin{align*} \mathbf{Y}[f] &= \sum\limits_{n=0}^{N-1} y[n] \cos\left(\pi (k+\frac12 \frac nN \right) ,& f\in \{0,\dots,N-1\} \end{align*}$$$$\begin{align*} \mathbf{Y}[f] &= \sum\limits_{n=0}^{N-1} y[n] \cos\left(\pi (k+\frac12) \frac nN \right) ,& f\in \{0,\dots,N-1\}\tag{1} \\ &\text{which, Euler says, is}\\ &= \sum\limits_{n=0}^{N-1} y[n]\left(e^{j\pi (k+\frac12) \frac nN } + e^{-j\pi (k+\frac12) \frac nN }\right),& f\in \{0,\dots,N-1\}\text.\tag{2} \end{align*}$$

Now, calculating the inverse discrete Fourier of the discrete cosine transform becomes but a matter of diligence; calculating by inserting $(2)$ into $(1)$, you'll notice that the complex sinusoids are orthogonal w.r.t. the scalar product, ie. the sum over the element-wise products becomes zero for everything but the same exponents.

Let's define the N-point DFT $Y(f)$ of a signal $y[n]$ as

$$\begin{align*} Y[f] &= \sum\limits_{n=0}^{N-1} y[n] e^{j2\pi f\,\frac{n}{N}},& f\in \{0,\dots,N-1 \} \end{align*}$$ The DCT-II (which is most probably what we're looking at; the others are mathematically useful, but less nice to implement) $\mathbf{Y}[f]$:

$$\begin{align*} \mathbf{Y}[f] &= \sum\limits_{n=0}^{N-1} y[n] \cos\left(\pi (k+\frac12 \frac nN \right) ,& f\in \{0,\dots,N-1\} \end{align*}$$

Let's define the N-point IDFT $y[n]$ of a signal $Y[f]$ as

$$\begin{align*} y[n] &= \sum\limits_{n=0}^{N-1} Y[f] e^{j2\pi n\,\frac{f}{N}},& n\in \{0,\dots,N-1 \} \end{align*}$$ The DCT-II (which is most probably what we're looking at; the others are mathematically useful, but less nice to implement) $\mathbf{Y}[f]$:

$$\begin{align*} \mathbf{Y}[f] &= \sum\limits_{n=0}^{N-1} y[n] \cos\left(\pi (k+\frac12) \frac nN \right) ,& f\in \{0,\dots,N-1\}\tag{1} \\ &\text{which, Euler says, is}\\ &= \sum\limits_{n=0}^{N-1} y[n]\left(e^{j\pi (k+\frac12) \frac nN } + e^{-j\pi (k+\frac12) \frac nN }\right),& f\in \{0,\dots,N-1\}\text.\tag{2} \end{align*}$$

Now, calculating the inverse discrete Fourier of the discrete cosine transform becomes but a matter of diligence; calculating by inserting $(2)$ into $(1)$, you'll notice that the complex sinusoids are orthogonal w.r.t. the scalar product, ie. the sum over the element-wise products becomes zero for everything but the same exponents.

Source Link
Marcus Müller
  • 34.4k
  • 4
  • 37
  • 64

Let's define the N-point DFT $Y(f)$ of a signal $y[n]$ as

$$\begin{align*} Y[f] &= \sum\limits_{n=0}^{N-1} y[n] e^{j2\pi f\,\frac{n}{N}},& f\in \{0,\dots,N-1 \} \end{align*}$$ The DCT-II (which is most probably what we're looking at; the others are mathematically useful, but less nice to implement) $\mathbf{Y}[f]$:

$$\begin{align*} \mathbf{Y}[f] &= \sum\limits_{n=0}^{N-1} y[n] \cos\left(\pi (k+\frac12 \frac nN \right) ,& f\in \{0,\dots,N-1\} \end{align*}$$