progress
Fraction of files read
Description
returns the fraction of files read in the datastore as a normalized value in the range
[0,1].fractionRead
= progress(ADS
)
Examples
Return Fraction of Files Read
Create an audioDatastore
object ADS
. Read a file from the datastore and then call progress
to return the fraction of files read.
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 34 more } Folders: { '/mathworks/devel/bat/Bdoc23b/build/matlab/toolbox/audio/samples' } AlternateFileSystemRoots: {} OutputDataType: 'double' Labels: {} SupportedOutputFormats: ["wav" "flac" "ogg" "opus" "mp4" "m4a"] DefaultOutputFormat: "wav"
fractionOfFilesRead = progress(ADS)
fractionOfFilesRead = 0
data = read(ADS); fractionOfFilesRead = progress(ADS)
fractionOfFilesRead = 0.0270
Input Arguments
ADS
— Audio datastore
audioDatastore
object
Specify ADS
as an audioDatastore
object.
Output Arguments
fractionRead
— Fraction of files read
normalized value in the range [0,1]
Fraction of files read, returned as a normalized value in the range [0,1].
Data Types: double
Version History
Introduced in R2018b
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
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.
Select a Web Site
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:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)