ドキュメンテーションヘルプ センター
最新のリリースでは、このページがまだ翻訳されていません。 このページの最新版は英語でご覧になれます。
データが読み取り可能かどうかを判別
tf = hasdata(ds)
例
tf = hasdata(ds) は、ds で指定されたデータ ストアに読み取り可能なデータがある場合に logical 1 (true) を返します。その他の場合は logical 0 (false) を返します。
ds
1
true
0
false
すべて折りたたむ
関数 mapreduce の出力ファイルであるサンプル ファイル mapredout.mat からデータ ストアを作成します。
mapreduce
mapredout.mat
ds = datastore('mapredout.mat');
読み取り可能なデータがなくなるまで、データ ストアのデータを読み取ります。
while hasdata(ds) T = read(ds); end
入力データ ストア。次のデータ ストアを hasdata メソッドの入力として使用できます。
hasdata
MATLAB® データ ストア — MATLAB datastore 関数を使用して作成されたデータ ストア。たとえば、ImageDatastore を使用して、イメージの集合用のデータ ストアを作成します。データ ストアの完全な一覧は、ファイル形式またはアプリケーション用のデータ ストアの選択を参照してください。
datastore
ImageDatastore
統合または変換を行ったデータ ストア — 関数 combine および transform を使用して作成したデータ ストア。
combine
transform
カスタム データ ストア — カスタム データ ストア フレームワークを使用して作成したデータ ストア。カスタム データ ストアの開発を参照してください。
この例の変更されたバージョンがシステム上にあります。代わりにこのバージョンを開きますか?
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
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