%% Spectral Rolloff Point of Time-Domain Audio
% Read in an audio file, calculate the rolloff point using default parameters, and then plot the results.

[audioIn,fs] = audioread('Counting-16-44p1-mono-15secs.wav');
rolloffPoint = spectralRolloffPoint(audioIn,fs);

t = linspace(0,size(audioIn,1)/fs,size(rolloffPoint,1));
plot(t,rolloffPoint)
xlabel('Time (s)')
ylabel('Rolloff Point (Hz)')

%
% Copyright 2018 The MathWorks, Inc.