# [SOLVED]DST and DCT transforms

Status
Not open for further replies.

#### 8macius7

##### Newbie level 2 Hi

I'm trying to compare cosine and sine transforms. I found in "Data Compression: Complete Reference" following quote:
The disadvantage of this can be seen when we consider the example of eight identical
data values being transformed by the DCT and by the DST. Identical values are, of
course, perfectly correlated.
Applying the DCT to these values produces just a DC coefficient: All the AC coefficients are
zero. The DCT compacts all the energy of the data into the single DC coefficient whose
value is identical to the values of the data items
.
This my result from method written in Mathematica:
Code:
DCT[{100, 100, 100, 100, 100, 100, 100, 100}]
(282.843 0 0 0 0 0 0 0)
So, value of DC coefficient is not identical like value of data items ?

Second problem...
Example: Applying the DST to the eight identical values 100 results in the eight
coefficients (0, 256.3, 0, 90, 0, 60.1, 0, 51).
This my result from method written in Mathematica:
Code:
DST[{100, 100, 100, 100, 100, 100, 100, 100}]
(256.292 0 89.9976 0 60.1345 0 50.9796 0)
Applying the DST to the eight highly correlated values 11, 22, 33, 44, 55, 66, 77,
and 88 results in the even worse set of coefficients
(0, 126.9, −57.5, 44.5, −31.1, 29.8, −23.8, 25.2)
This my result from method written in Mathematica:
Code:
DST[{11, 22, 33, 44, 55, 66, 77, 88}]
(126.864 -57.4888 44.5488 -31.1127 29.7666 -23.8126 25.2349 -15.5563)
Someone could explain me this differences ?

Thanks!

Status
Not open for further replies.