progress
説明
例
読み取られたファイルの割合
ファイルセットから読み取られたファイルの割合を確認します。
ファイルの集合のファイルセット fs
を作成します。
folder = {'accidents.mat','airlineResults.mat','census.mat','earth.mat'}
folder = 1x4 cell
{'accidents.mat'} {'airlineResults.mat'} {'census.mat'} {'earth.mat'}
fs = matlab.io.datastore.FileSet(folder)
fs = FileSet with properties: NumFiles: 4 NumFilesRead: 0 FileInfo: Show FileInfo for all 4 files AlternateFileSystemRoots: {}
1 つ目のファイルに関する情報を取得し、内部ポインターを 1 ファイル前に移動します。
file1 = nextfile(fs)
file1 = 1x1 FileInfo Filename FileSize ______________________________________________________________________________ ________ "/mathworks/devel/bat/Bdoc23a/build/matlab/toolbox/matlab/demos/accidents.mat" 7343
関数 progress
を使用して、ファイルセットから読み取られたファイルの割合を確認します。
p = progress(fs)
p = 0.2500
入力引数
fs
— ファイルセット
BlockedFileSet
オブジェクトまたは FileSet
オブジェクト
ファイルセット。BlockedFileSet
オブジェクトまたは FileSet
オブジェクトとして指定します。BlockedFileSet
または FileSet
オブジェクトを作成するには、matlab.io.datastore.BlockedFileSet
および matlab.io.datastore.FileSet
を参照してください。
バージョン履歴
R2020a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
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)