How to plot envelope of a signal

조회 수: 112 (최근 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 CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by