FourierDCT
✖
FourierDCT
Details

- Possible types m of discrete cosine transform for a list
of length
giving a result
are:
-
1 (DCT-I) 2 (DCT-II) 3 (DCT-III) 4 (DCT-IV) - FourierDCT[list] is equivalent to FourierDCT[list,2].
- The inverse discrete cosine transforms for types 1, 2, 3, and 4 are types 1, 3, 2, and 4, respectively.
- The list given in FourierDCT[list] can be nested to represent an array of data in any number of dimensions.
- The array of data must be rectangular.
- If the elements of list are exact numbers, FourierDCT begins by applying N to them.
- FourierDCT can be used on SparseArray objects.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Find a discrete cosine transform:

https://wolfram.com/xid/0d6fi5pnaz-cp3avz

Find the inverse discrete cosine transform:

https://wolfram.com/xid/0d6fi5pnaz-or46i9

Find a discrete cosine transform of type 1 (DCT-I):

https://wolfram.com/xid/0d6fi5pnaz-c3pfpi

Find the inverse discrete cosine transform:

https://wolfram.com/xid/0d6fi5pnaz-gcl549

Scope (2)Survey of the scope of standard use cases
Use machine arithmetic to compute the discrete cosine transform:

https://wolfram.com/xid/0d6fi5pnaz-ey73mv

https://wolfram.com/xid/0d6fi5pnaz-cwvgdf

Use 24-digit precision arithmetic:

https://wolfram.com/xid/0d6fi5pnaz-fyo9i6

A two-dimensional discrete cosine transform:

https://wolfram.com/xid/0d6fi5pnaz-bbgp1y

https://wolfram.com/xid/0d6fi5pnaz-bmat6k

A five-dimensional discrete cosine transform:

https://wolfram.com/xid/0d6fi5pnaz-b6uq7

https://wolfram.com/xid/0d6fi5pnaz-3gt9n

Generalizations & Extensions (2)Generalized and extended use cases
Applications (3)Sample problems that can be solved with this function
Compressing Image Data (1)

https://wolfram.com/xid/0d6fi5pnaz-eucewz


https://wolfram.com/xid/0d6fi5pnaz-fhhdzo
The diagonal spectra shows exponential decay:

https://wolfram.com/xid/0d6fi5pnaz-kpcgtm

Truncate modes in each axis, effectively compressing by a factor of :

https://wolfram.com/xid/0d6fi5pnaz-mf75zk

https://wolfram.com/xid/0d6fi5pnaz-bh9ss5

Cosine Series Expansion (1)
Get an expansion for an even function as a sum of cosines:

https://wolfram.com/xid/0d6fi5pnaz-e4it3w
The function values on a uniformly spaced grid with points on
:

https://wolfram.com/xid/0d6fi5pnaz-cxv768

Compute the DCT-III and renormalize:

https://wolfram.com/xid/0d6fi5pnaz-904ye
The function has, in effect, been periodized with a particular symmetry:

https://wolfram.com/xid/0d6fi5pnaz-b84knh

Plot the expansion error where the points are defined:

https://wolfram.com/xid/0d6fi5pnaz-tkscl

Chebyshev Basis Expansion (1)
Get an expansion for a function in the Chebyshev polynomials:

https://wolfram.com/xid/0d6fi5pnaz-fcuwgs
The values of the function at the Chebyshev nodes:

https://wolfram.com/xid/0d6fi5pnaz-6uyoe

Find the Chebyshev coefficients:

https://wolfram.com/xid/0d6fi5pnaz-xnku2

https://wolfram.com/xid/0d6fi5pnaz-gq2wl0

Properties & Relations (3)Properties of the function, and connections to other functions
DCT-I and DCT-IV are their own inverses:

https://wolfram.com/xid/0d6fi5pnaz-ewwesq

https://wolfram.com/xid/0d6fi5pnaz-ewncg2


https://wolfram.com/xid/0d6fi5pnaz-qxzky

DCT-II and DCT-III are inverses of each other:

https://wolfram.com/xid/0d6fi5pnaz-f5nepf

https://wolfram.com/xid/0d6fi5pnaz-lidfoy


https://wolfram.com/xid/0d6fi5pnaz-chdoia

The DCT is equivalent to matrix multiplication:

https://wolfram.com/xid/0d6fi5pnaz-1m6g0

https://wolfram.com/xid/0d6fi5pnaz-ehhafb


https://wolfram.com/xid/0d6fi5pnaz-bgwh89

https://wolfram.com/xid/0d6fi5pnaz-b1d7lk

Possible Issues (1)Common pitfalls and unexpected behavior
FourierDCT always returns normalized results:

https://wolfram.com/xid/0d6fi5pnaz-pzjmzy

To get unnormalized results, you can multiply by the normalization:

https://wolfram.com/xid/0d6fi5pnaz-bj7byi

https://wolfram.com/xid/0d6fi5pnaz-gpknim

https://wolfram.com/xid/0d6fi5pnaz-jnv8nc

Wolfram Research (2007), FourierDCT, Wolfram Language function, https://reference.wolfram.com/language/ref/FourierDCT.html.
Text
Wolfram Research (2007), FourierDCT, Wolfram Language function, https://reference.wolfram.com/language/ref/FourierDCT.html.
Wolfram Research (2007), FourierDCT, Wolfram Language function, https://reference.wolfram.com/language/ref/FourierDCT.html.
CMS
Wolfram Language. 2007. "FourierDCT." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FourierDCT.html.
Wolfram Language. 2007. "FourierDCT." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FourierDCT.html.
APA
Wolfram Language. (2007). FourierDCT. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FourierDCT.html
Wolfram Language. (2007). FourierDCT. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FourierDCT.html
BibTeX
@misc{reference.wolfram_2025_fourierdct, author="Wolfram Research", title="{FourierDCT}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/FourierDCT.html}", note=[Accessed: 02-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_fourierdct, organization={Wolfram Research}, title={FourierDCT}, year={2007}, url={https://reference.wolfram.com/language/ref/FourierDCT.html}, note=[Accessed: 02-June-2025
]}