ドキュメンテーションヘルプ センター
最新のリリースでは、このページがまだ翻訳されていません。 このページの最新版は英語でご覧になれます。
信号のサブセットをもつデータストアの作成
sdssubset = subset(sds,indices)
例
sdssubset = subset(sds,indices) は、sds の信号のサブセットを含む信号データストア sdssubset を返します。
sdssubset
sds
indices
すべて折りたたむ
Signal Processing Toolbox™ に含まれる信号サンプルへのファイル パスを指定します。
folder = fullfile(matlabroot,'toolbox','matlab','demos');
指定したフォルダーを示す信号データストアを作成します。データストアの最初の 10 個のファイルの名前をリストします。
sds = signalDatastore(folder); c = extractAfter(sds.Files,'demos\'); c{1:10}
ans = 'accidents.mat'
ans = 'airfoil.mat'
ans = 'airlineResults.mat'
ans = 'cape.mat'
ans = 'census.mat'
ans = 'clown.mat'
ans = 'detail.mat'
ans = 'dmbanner.mat'
ans = 'durer.mat'
ans = 'earth.mat'
信号データストアのファイル名が 'air' で始まるかどうかを示す logical ベクトルを作成します。
'air'
fileContainsAir = cellfun(@(c)startsWith(c,'air'),c);
信号データストアに対して関数 subset を呼び出し、'air' で始まるファイルに対応するインデックスを呼び出します。
subset
air
sdssubset = subset(sds,fileContainsAir)
sdssubset = signalDatastore with properties: Files:{ 'B:\21\ubhattac.techreview.0111\matlab\toolbox\matlab\demos\airfoil.mat'; ' ...\matlab\toolbox\matlab\demos\airlineResults.mat' } AlternateFileSystemRoots: [0×0 string] ReadSize: 1
signalDatastore
信号データストア。signalDatastore オブジェクトとして指定します。
以下のように indices を指定します。
sdssubset に含まれるファイルまたはメンバーのインデックスを含むベクトル。関数 subset は、一意ではないインデックスを受け入れます。
sds のファイルまたはメンバーの数と同じ長さの logical ベクトル。インデックスが logical ベクトルとして指定される場合、true は対応するファイルまたはメンバーが sdssubset に含まれることを示します。
true
データ型: double | logical
double
logical
信号データストアのサブセット。signalDatastore オブジェクトとして返されます。
numpartitions | partition | shuffle | signalDatastore
numpartitions
partition
shuffle
この例の変更されたバージョンがシステム上にあります。代わりにこのバージョンを開きますか?
次の 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