How to plot envelope of a signal

99 ビュー (過去 30 日間)
Ying Wu
Ying Wu 2022 年 10 月 3 日
コメント済み: Ying Wu 2022 年 10 月 4 日
Hi, I have trouble in plotting a smooth envelope of a signal using the envelope function in Matlab or the hilbert method. The time series of my signal is shown below and I want to obtian the red line to link the peak values.
But using envelope() function or hilbert method, I plot something like
Can anyone help me to solve this questions? Thanks!
I attach my data here.

採用された回答

Chunru
Chunru 2022 年 10 月 4 日
load t.mat
load signal.mat
whos
Name Size Bytes Class Attributes ans 1x35 70 char cmdout 1x33 66 char signal 40001x1 320008 double t 40001x1 320008 double
plot(t, signal);
hold on
[yupper,ylower] = envelope(signal,1000, 'peak');
plot(t, yupper, 'r--', t, ylower, 'g--')
  3 件のコメント
Chunru
Chunru 2022 年 10 月 4 日
There is not a one-for-all method for envelope detection when noise is added. You can try to adjust the window size for your new signal to see if you can obtain a good result.
Ying Wu
Ying Wu 2022 年 10 月 4 日
@Chunru OK, thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by