このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
wthresh
ソフトなしきい値処理またはハードなしきい値処理
説明
例
ソフトなしきい値処理とハードなしきい値処理
信号を生成し、しきい値を設定します。
y = linspace(-1,1,100); thr = 0.4;
ハードなしきい値処理とソフトなしきい値処理を実行します。
yhard = wthresh(y,"h",thr); ysoft = wthresh(y,"s",thr);
結果をプロットして、元の信号と比較します。
tiledlayout(1,3) nexttile plot(y,y) ylim([-1 1]) title("Original Signal") nexttile plot(y,yhard) ylim([-1 1]) title("Hard Threshold") nexttile plot(y,ysoft) ylim([-1 1]) title("Soft Threshold")
しきい値を使用した信号のノイズ除去
ノイズがある Doppler 信号を読み込みます。信号の間引きなしの離散ウェーブレット変換をレベル 4 まで下げて求めます。
load noisdopp
wt = modwt(noisdopp,4);
最も細かいスケールのウェーブレット係数に基づいて、Donoho-Johnstone のユニバーサルしきい値を決定します。
thr = median(abs(wt(1,:)-median(wt(1,:))))/0.6745;
ウェーブレット変換にソフトなしきい値処理を適用し、結果を反転して、ノイズ除去された信号を求めます。
wtthr = wthresh(wt,"s",thr);
xden = imodwt(wtthr);
元の信号とノイズ除去後の信号をプロットします。
plot([noisdopp(:) xden(:)]) axis tight legend("Original","Thresholded",Location="southeast")
入力引数
X
— 入力データ
ベクトル | 行列
しきい値への入力データ。ベクトルまたは行列として指定します。
データ型: single
| double
複素数のサポート: あり
sorh
— しきい値処理のタイプ
"s"
| "h"
実行するしきい値処理のタイプ。
"s"
— ソフトなしきい値処理"h"
— ハードなしきい値処理
T
— しきい値
正の実数
しきい値。正の実数として指定します。
データ型: single
| double
アルゴリズム
sorh
が "s"
の場合、Y
は X
のソフトなしきい値処理であり、 となります。
ソフトなしきい値処理は、ウェーブレットの縮小です。
sorh
が "h"
の場合、Y
は X
のハードなしきい値処理であり、 となります。
ハードなしきい値処理は、ソフトなしきい値処理よりも大まかなものになります。
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
バージョン履歴
R2006a より前に導入R2023b: しきい値の複素数値および単精度の入力
関数 wthresh
は、複素数値および単精度の入力をサポートします。
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)