Matlab envelope function help

11 次查看(过去 30 天)
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!

采纳的回答

John D'Errico
John D'Errico 2021-9-5
编辑:John D'Errico 2021-9-5
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.

更多回答(0 个)

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by