ドキュメンテーションヘルプ センター
最新のリリースでは、このページがまだ翻訳されていません。 このページの最新版は英語でご覧になれます。
信号データストアの信号のシャッフル
shuffledsds = shuffle(sds)
例
shuffledsds = shuffle(sds) は、入力データストア sds のディープ コピーを作成し、関数 randperm を使用して信号をシャッフルします。
shuffledsds
sds
randperm
すべて折りたたむ
MATLAB® に含まれる信号の例へのパスを指定します。指定したフォルダーを示す信号データストアを作成し、関数 extractAfter を使用して、データストアのファイルの名前を抽出します。
extractAfter
folder = fullfile(matlabroot,'toolbox','matlab','audiovideo'); sds = signalDatastore(folder); c1 = extractAfter(sds.Files,'audiovideo\')
c1 = 7×1 cell {'chirp.mat' } {'gong.mat' } {'handel.mat' } {'laughter.mat'} {'mtlb.mat' } {'splat.mat' } {'train.mat' }
ファイルをシャッフルして、同じファイルをランダムな順序で含む新しいデータストアを作成します。関数 extractAfter を使用して、シャッフルしたデータストアのファイルの名前を抽出します。
sdsshuffled = shuffle(sds); c2 = extractAfter(sdsshuffled.Files,'audiovideo\')
c2 = 7×1 cell {'splat.mat' } {'handel.mat' } {'train.mat' } {'mtlb.mat' } {'chirp.mat' } {'gong.mat' } {'laughter.mat'}
signalDatastore
信号データストア。signalDatastore オブジェクトとして指定します。
シャッフルされた信号データストア。sds のファイルまたはメンバーをランダムな順序で含む signalDatastore オブジェクトとして返されます。
"ディープ コピー" は、すべてのレベルのデータがコピーされたコピーを指します。たとえば、ある構造体のディープ コピーは、各フィールドおよび各フィールドの内容 (存在する場合) をコピーします。
signalDatastore | subset
subset
この例の変更されたバージョンがシステム上にあります。代わりにこのバージョンを開きますか?
次の 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