%% Spectral Flux of Time-Domain Audio
% Read in an audio file, calculate the flux using default parameters, and then plot the results.

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

t = linspace(0,size(audioIn,1)/fs,size(flux,1));
plot(t,flux)
xlabel('Time (s)')
ylabel('Flux')

%
% Copyright 2018 The MathWorks, Inc.