dct

From STX Wiki
< Programmer Guide‎ | Command Reference‎ | EVAL
Revision as of 17:31, 18 November 2010 by Admin (talk | contribs) (1 revision: Initial import)
Jump to navigationJump to search
dct

Discrete Cosine Transform.

Usage:

dct(x {, n {, 0}})

Function:

Computes the discrete cosine transform of x. n must be in the range 1..nrow(x). The default is n = nrow(x).

Result:

A vector containing the first n dct coefficients.

Usage:

dct(x, n, 1)

Function:

Computes the inverse dct of x.

If n <= nrow(x):

Only the first n coefficients of x are used, the others are set to 0. Output length = nrow(x).

If n > nrow(x):

x is expanded with zeros to n elements.

Result:

A vector containing the inverse dct.

Navigation menu

Personal tools