このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
getLabeledSignal
ラベル付き信号セットからのラベル付き信号の取得
説明
例
ラベル付き信号の取得
クジラの歌の録音を含むラベル付き信号セットを読み込みます。
load whales
lss
lss = labeledSignalSet with properties: Source: {2x1 cell} NumMembers: 2 TimeInformation: "sampleRate" SampleRate: 4000 Labels: [2x3 table] Description: "Characterize wave song regions" Use labelDefinitionsHierarchy to see a list of labels and sublabels. Use setLabelValue to add data to the set.
lss
のすべての信号を含む table を取得します。
t = getLabeledSignal(lss)
t=2×4 table
Signal WhaleType MoanRegions TrillRegions
________________ _________ ___________ ____________
Member{1} {79572x1 double} blue {3x2 table} {1x3 table}
Member{2} {76579x1 double} blue {3x2 table} {1x3 table}
ふるえ声の領域のサブラベルを特定します。
d = getLabelNames(lss,'TrillRegions')
d = "TrillPeaks"
セットの 2 番目のメンバーに対応するラベル付き信号を取得します。サンプル レートを決定します。
idx = 2; [lbs,info] = getLabeledSignal(lss,idx)
lbs=1×4 table
Signal WhaleType MoanRegions TrillRegions
________________ _________ ___________ ____________
Member{2} {76579x1 double} blue {3x2 table} {1x3 table}
info = struct with fields:
TimeInformation: "sampleRate"
SampleRate: 4000
fs = info.SampleRate;
うめき声とふるえ声の関心領域を特定します。signalMask
オブジェクトを使用して信号をプロットし、うめき声とふるえ声を強調表示します。
mvals = getLabelValues(lss,idx,'MoanRegions'); tvals = getLabelValues(lss,idx,'TrillRegions'); tb = [mvals;tvals]; tb.Value = categorical( ... [repmat("moan",height(mvals),1);repmat("trill",height(tvals),1)], ... ["moan" "trill"]); sm = signalMask(tb,"SampleRate",fs); plotsigroi(sm,getSignal(lss,idx))
ふるえ声の領域の 3 つのピークを特定して、それらをプロットします。
peaks = getLabelValues(lss,idx,{'TrillRegions','TrillPeaks'}); hold on pk = plot(peaks.Location,cell2mat(peaks.Value),'v'); hold off legend(pk,'trill peaks')
入力引数
lss
— ラベル付き信号セット
labeledSignalSet
オブジェクト
ラベル付き信号セット。labeledSignalSet
オブジェクトとして指定します。
例:
は、属性 labeledSignalSet
({randn(100,1) randn(10,1)},signalLabelDefinition('female'))'female'
を含むランダム信号の 2 つのメンバーのセットを指定します。
midx
— メンバーの行番号
正の整数
メンバーの行番号。正の整数で指定します。midx
は、メンバーの行番号をラベル付き信号セットのLabelsテーブルに表示される行番号として指定します。
出力引数
t
— ラベル付き信号
table
ラベル付き信号。table として指定します。
info
— 時間情報
構造体
時間情報。構造体として返されます。
バージョン履歴
R2018b で導入
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)