主要内容

reset

Reset datastore read pointer to start of data

Description

reset(sds) resets the datastore read pointer to the start of the data. Resetting allows re-reading from the same datastore.

example

Examples

collapse all

Specify the path to the sample signals included with Signal Processing Toolbox™.

folder = fullfile(matlabroot,'toolbox','matlab','audiovideo');

Create a signal datastore that points to the specified folder.

sds = signalDatastore(folder);

While the datastore has unread files, call read in a loop to read files sequentially.

while hasdata(sds)
    data = read(sds);
end

Reset the datastore to the state where no data has been read from it. Read the first file from the datastore.

reset(sds)
data = read(sds);

Input Arguments

collapse all

Specify sds as an signalDatastore object.

Version History

Introduced in R2020a