Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When one refers to "the" discrete cosine transform (DCT), it is generally assumed that one means the type II DCT, where the input array $x_k$ ($0 \leq k < N-1$) is even about $k=-1/2$ and $k=N-1/2$.

Is there a similar convention for "the" discrete sine transform? MATLAB defaults to type I, while Mathematica prefers type II. The FFTW docs are silent on the matter.

share|cite|improve this question
up vote 2 down vote accepted

There are eight kinds of DCTs, and eight kinds of DSTs. The classification is due to Wang and Hunt.

You'd do well to just specify the DTT type explicitly; DCT-II being the "default" DCT is due to its ubiquity (e.g. JPEG). Personally, I tend to use types I, II, and III of DST and DCT in my work, and I think it is not unhelpful to always append the type to the DCT or DST that you're using.

share|cite|improve this answer
Just to be painfully explicit. DCT-II is the default because of its ubiquity. However, the DST (all eight of them) has not developed a similar convention. – matt Dec 7 '11 at 0:20
Yep, nice summary. :) – J. M. Dec 7 '11 at 0:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.