How to plot envelope of a signal
34 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponse acceptée
Chunru
le 4 Oct 2022
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 commentaires
Chunru
le 4 Oct 2022
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Hilbert and Walsh-Hadamard Transforms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!