%% Calculate MDCT
% Read in an audio file and then calculate the MDCT using a 1024-point Kaiser-Bessel-derived window.

audioIn = audioread('Counting-16-44p1-mono-15secs.wav');

coef = mdct(audioIn,kbdwin(1024));

%
% Plot the power of the MDCT coefficients over time.

surf(20*log10(coef.^2),'EdgeColor','none');
view([0 90])
xlabel('Frame')
ylabel('Frequency')
axis([0 size(coef,2) 0 size(coef,1)])
colorbar

%
% Copyright 2018 The MathWorks, Inc.