short time energy matlab code for audio feature extraction
Short time energy (STE) is simple feature and so is the code to compute it.

ste = sum(buffer(signal.^2, winLen));


where  and winLen is duration of rectangular time window (in samples).

If you want to use diffrent shape of window, then you have to multiply each column returned by buffer by this window, before you sum the columns.