Read all signals from datastore
data = readall(sds)
example
data = readall(sds) reads all signal data from the datastore sds.
data
sds
collapse all
Specify the path to four signals included with MATLAB®. The signals are recordings of a bird chirp, a gong, a train, and a splat. All signals are sampled at 8192 Hz.
folder = fullfile(matlabroot,'toolbox','matlab','audiovideo', ... ["chirp.mat","gong.mat","train.mat","splat.mat"]); fs = 8192; sds = signalDatastore(folder,'SampleRate',fs);
Read the data in the first variables of all the files in the datastore and plot the Fourier synchrosqueezed transform of each signal.
data = readall(sds); tiledlayout('flow') for i = 1:length(data) nexttile fsst(data{i},fs,'yaxis') end
signalDatastore
Signal datastore, specified as a signalDatastore object.
All signals in the signal datastore, returned as a cell array. Each cell of data contains signals from a file or a member.
When reading file data, because this function reads all the data in the files at once, you may run out of memory if your dataset is large.
preview | read | signalDatastore
preview
read
You have a modified version of this example. Do you want to open this example with your edits?