Find energy for each second of audio file
23 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Giggs B.
am 25 Jul. 2021
Kommentiert: Star Strider
am 26 Jul. 2021
Hi,
I have an audio signal which has 44.1 KHz sampling rate, which would be stored as an array. I am trying to find energy for each second using:
sum(x.^2);
Can someone help me how to do that? Thanks
0 Kommentare
Akzeptierte Antwort
Star Strider
am 25 Jul. 2021
Fs = 44.1E+3; % Sampling Frequency
s = randn(Fs*5.2,1); % Signal
seconds_sampled = 1; % Desired Smaple Length
sec1 = Fs*seconds_sampled; % Corresponding Samples
s_sections = buffer(s,sec1)
Check = size(s_sections)
Energy = sum(s_sections.^2)
.
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Signal Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!