How to plot envelope of a signal
49 次查看(过去 30 天)
显示 更早的评论
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1144320/image.jpeg)
But using envelope() function or hilbert method, I plot something like
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1144325/image.png)
Can anyone help me to solve this questions? Thanks!
I attach my data here.
0 个评论
采纳的回答
Chunru
2022-10-4
load t.mat
load signal.mat
whos
plot(t, signal);
hold on
[yupper,ylower] = envelope(signal,1000, 'peak');
plot(t, yupper, 'r--', t, ylower, 'g--')
3 个评论
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!