%% Shuffle Files in Signal Datastore
% Specify the path to the example signals included with MATLAB®. Create a signal datastore that points to the specified folder and use the extractAfter function to extract the names of the files in the datastore.

folder = fullfile(matlabroot,'toolbox','matlab','audiovideo');
sds = signalDatastore(folder);
c1 = extractAfter(sds.Files,'audiovideo\')

% Shuffle the files to create a new datastore containing the same files in random order. Use the extractAfter function to extract the names of the files in the shuffled datastore.

sdsshuffled = shuffle(sds);
c2 = extractAfter(sdsshuffled.Files,'audiovideo\')

% Copyright 2019 The MathWorks, Inc.