Matlab envelope function help

12 vues (au cours des 30 derniers jours)
Leon Ellis
Leon Ellis le 5 Sep 2021
Good day, my goal is to use the envelope() function to take sound signals and plot it's outskurts, so only it's amplitudes. Given an array of all the amplitudes of this sound signal, i was told I could use the envelope() function to create a new array plotting the outskirts of the signal making it easier to find words spoken in the sound wave. I'm unsure how to do this and am struggling to understand how the function works. If possible could I please get examples on how the function works (explain it as if I'm a dummy, cause at this point I think I am). Thanks a lot in advance!

Réponse acceptée

John D'Errico
John D'Errico le 5 Sep 2021
Modifié(e) : John D'Errico le 5 Sep 2021
Seems pretty easy. Read the help, and look at the examples. Envelope is part of the signal processing toolbox.
t = linspace(0,5*pi,300);
sig = 2*sin(t) + sin(3*t) + randn(size(t))/50; % some noise for fun
[hi,lo] = envelope(sig);
plot(t,sig,'r-',t,hi,'g-',t,lo,'b-')
legend('Signal','upper','lower')
grid on
It can probably do better if I spend some time reading the help, but that is your job. I don't even have that toolbox.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by