how to write a program in matlab for to identify the energy level in given speech signal
Show older comments
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 Comment
Thomas
on 5 Nov 2012
The for line makes no sense.. What are you trying to do
what is
for t=[4000:4000:1] ??
Answers (1)
Wayne King
on 5 Nov 2012
Edited: Wayne King
on 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)
Categories
Find more on Correlation and Convolution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!