Mercurial > hg > emotion-detection-top-level
view Code/Descriptors/Matlab/Common/ShortTimeEnergy.m @ 4:92ca03a8fa99 tip
Update to ICASSP 2013 benchmark
author | Dawn Black |
---|---|
date | Wed, 13 Feb 2013 11:02:39 +0000 |
parents | ea0c737c6323 |
children |
line wrap: on
line source
function E = ShortTimeEnergy(signal, windowLength, step); signal = signal / max(max(signal)); curPos = 1; L = length(signal); numOfFrames = floor((L-windowLength)/step) + 1; %H = hamming(windowLength); E = zeros(numOfFrames,1); for (i=1:numOfFrames) window = (signal(curPos:curPos+windowLength-1)); E(i) = (1/(windowLength)) * sum(abs(window.^2)); curPos = curPos + step; end