Signal Processing Toolbox Help Desk

dct

Purpose

Discrete cosine transform (DCT).

Syntax

Description

y = dct(x) returns the discrete cosine transform of x

where N is the length of x, and x and y are the same size. If x is a matrix, dct transforms its columns. The series is indexed from n + 1 and k + 1 instead of the usual n and k because MATLAB vectors run from 1 to N instead of from 0 to N- 1.

y = dct(x,n) pads or truncates x to length n before transforming.

If x is a matrix, dct transforms its columns.

The DCT is closely related to the discrete Fourier transform. You can often reconstruct a sequence very accurately from only a few DCT coefficients, a useful property for applications requiring data reduction.

Example

Find how many DCT coefficients represent 99% of the energy in a sequence:

See Also

fft

One-dimensional fast Fourier transform.

idct

Inverse discrete cosine transform.

dct2

Two-dimensional DCT (see Image Processing Toolbox User's Manual).

idct2

Two-dimensional inverse DCT (see Image Processing Toolbox User's Manual).



[ Previous | Help Desk | Next ]