This is discrete cosine transform code taken from net , i want to use it but didnt understand what happening in this code specially whole for loop Statements ?
1 view (last 30 days)
Show older comments
[A1, f] = wavread('A1.wav');
windowSize = 8192;
samplesHalf = windowSize / 2;
samplesQuarter = windowSize / 4;
samplesEighth = windowSize / 8;
funkyCompressed2 = [];
funkyCompressed4 = [];
funkyCompressed8 = [];
for i=1:windowSize:length(A1)-windowSize
windowDCT = dct(A1(i:i+windowSize-1));
funkyCompressed2(i:i+windowSize-1) = idct(windowDCT(1:samplesHalf), windowSize);
funkyCompressed4(i:i+windowSize-1) = idct(windowDCT(1:samplesQuarter), windowSize);
funkyCompressed8(i:i+windowSize-1) = idct(windowDCT(1:samplesEighth), windowSize);
end
0 Comments
Answers (0)
See Also
Categories
Find more on Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!