This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

FourierDCT

FourierDCT[list]
finds the Fourier discrete cosine transform of a list of real numbers.
FourierDCT
finds the Fourier discrete cosine transform of type m.
  • 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
  • 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.
Find a discrete cosine transform:
Find the inverse discrete cosine transform:
Find a discrete cosine transform of type 1 (DCT-I):
Find the inverse discrete cosine transform:
Find a discrete cosine transform:
In[1]:=
Click for copyable input
Out[1]=
Find the inverse discrete cosine transform:
In[2]:=
Click for copyable input
Out[2]=
 
Find a discrete cosine transform of type 1 (DCT-I):
In[1]:=
Click for copyable input
Out[1]=
Find the inverse discrete cosine transform:
In[2]:=
Click for copyable input
Out[2]=
Use machine arithmetic to compute the discrete cosine transform:
Use 24-digit precision arithmetic:
A two-dimensional discrete cosine transform:
A five-dimensional discrete cosine transform:
The list may have complex values:
You can use "I", "II", "III", or "IV" for the types 1, 2, 3, and 4, respectively:
Import some image data:
The two-dimensional DCT:
The diagonal spectra shows exponential decay:
Truncate modes in each axis, effectively compressing by a factor of :
Invert the DCT:
Get an expansion for an even function as a sum of cosines:
The function values on a uniformly spaced grid with points on :
Compute the DCT-III and renormalize:
The function has, in effect, been periodized with a particular symmetry:
Plot the expansion error where the points are defined:
Get an expansion for a function in the Chebyshev polynomials:
The values of the function at the Chebyshev nodes:
Find the Chebyshev coefficients:
Show the error:
DCT-I and DCT-IV are their own inverses:
DCT-II and DCT-III are inverses of each other:
The DCT is equivalent to matrix multiplication:
FourierDCT always returns normalized results:
To get unnormalized results, you can multiply by the normalization:
New in 6