Question: how does dct work in matlab?
Answer: y = dct( x ) returns the unitary discrete cosine transform of input array x . The output y has the same size as x . If x has more than one dimension, then dct operates along the first array dimension with size greater than 1. ... y = dct( x , n , dim ) computes the transform along dimension dim .