Why there is a difference between the dct computed by the MATLAB dct function and one computed by dct matrix multiplication?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mohsin Shah
le 26 Fév 2018
Commenté : Mohsin Shah
le 26 Fév 2018
The result is different, though both methods give inverse transform correctly.
0 commentaires
Réponse acceptée
David Goodmanson
le 26 Fév 2018
Modifié(e) : David Goodmanson
le 26 Fév 2018
Hi Mohsin,
x needs to be a column vector as you did, but you don't need to take the transpose of dctmtx:
x = 1:8
y1 = dct(x')
y2 = dctmtx(8)*x'
y1 - y2
x1 = idct(y1)
x2 = dctmtx(8)\y2
Same results, out and back.
Plus de réponses (0)
Communautés
Plus de réponses dans Power Electronics Control
Voir également
Catégories
En savoir plus sur Transforms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!