%% Partition Datastore by Files
% 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);

%
% Partition the datastore by files and return the part corresponding to the second file. subds contains one file.

subds = partition(ADS,'Files',2)

%
% Copyright 2018 The MathWorks, Inc.