%% Create Datastore with Every Other File
% Specify the file path to the audio samples included with Audio Toolbox™. Create an audio datastore that points to the specified folder.

folder = fullfile(matlabroot,'toolbox','audio','samples');
ADS = audioDatastore(folder)

%
% Create an audio datastore containing every other file of the original datastore.

indices = 1:2:numel(ADS.Files);
ADSsubset = subset(ADS,indices)

%
% Copyright 2018 The MathWorks, Inc.