Programmer Guide/Command Reference/EVAL/dct: Difference between revisions
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
(initial import) |
m (1 revision: Initial import) |
Revision as of 17:31, 18 November 2010
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.