DocumentationHelp Center
Fraction of files read
fractionRead = progress(ADS)
example
fractionRead = progress(ADS) returns the fraction of files read in the datastore as a normalized value in the range [0,1].
fractionRead
ADS
collapse all
Create an audioDatastore object ADS. Read a file from the datastore and then call progress to return the fraction of files read.
audioDatastore
progress
ADS = audioDatastore(fullfile(matlabroot,'toolbox','audio','samples'))
ADS = audioDatastore with properties: Files: { ' .../build/matlab/toolbox/audio/samples/Ambiance-16-44p1-mono-12secs.wav'; ' .../matlab/toolbox/audio/samples/AudioArray-16-16-4channels-20secs.wav'; ' .../toolbox/audio/samples/ChurchImpulseResponse-16-44p1-mono-5secs.wav' ... and 27 more } Folders: { '/mathworks/devel/bat/Bdoc20b/build/matlab/toolbox/audio/samples' } AlternateFileSystemRoots: {} OutputDataType: 'double' Labels: {} SupportedOutputFormats: ["wav" "flac" "ogg" "mp4" "m4a"] DefaultOutputFormat: "wav"
fractionOfFilesRead = progress(ADS)
fractionOfFilesRead = 0
data = read(ADS); fractionOfFilesRead = progress(ADS)
fractionOfFilesRead = 0.0333
Specify ADS as an audioDatastore object.
Fraction of files read, returned as a normalized value in the range [0,1].
Data Types: double
double
audioDatastore | hasdata
hasdata
A modified version of this example exists on your system. Do you want to open this version instead?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office
Get trial now