%calculates the energy of a signal
function e = energy(f)
lf = length(f);
e = 0;
for i=1:lf
   e = e + (f(i))^2;
end
e = e^.5;