%% Preview Data in Signal Datastore
% Specify the path to four signals included with MATLAB®. Create a signal datastore that points to the specified folder and use the extractAfter function and display the name of the file previewed.

folder = fullfile(matlabroot,'toolbox','matlab','audiovideo');
sds = signalDatastore(folder);
c = extractAfter(sds.Files{1},'audiovideo\')

% Plot the previewed data from the first file of sds.

data = preview(sds);
plot(data)
xlabel('Samples')
ylabel('Signal')

% Copyright 2019 The MathWorks, Inc.