how to write a program in matlab for to identify the energy level in given speech signal
Afficher commentaires plus anciens
I wrote this program. is this correct...?
x=wavread('E:\project\kani imp\akk');
l=size(x)
s=1;
for t=[4000:4000:l]
sum=0;
for t1=[s:t]
sum=sum+abs(x.^2);
en=sum;
e=en+1;
end
end
y=length(e)
plot(y,e);
1 commentaire
Thomas
le 5 Nov 2012
The for line makes no sense.. What are you trying to do
what is
for t=[4000:4000:1] ??
Réponses (1)
Wayne King
le 5 Nov 2012
Modifié(e) : Wayne King
le 5 Nov 2012
I think you need to define for us what you mean by energy level
If you just mean the norm of the vector, the speech sample, then
norm(x)
gives you the 2-norm.
If you mean DC level, that is just:
mean(x)
or
xdft = fft(x);
1/length(x)*xdft(1)
Catégories
En savoir plus sur Correlation and Convolution dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!