For Programmers: Free Programming Magazines  


Home > Archive > Matlab > November 2005 > hamming windowing









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author hamming windowing
nicola

2005-11-30, 4:02 am

I have a problem with looping hamming window upon a signal (in my
case vocerun, which is a struct array, file wav).when i try to run my
code,it gives me error into the while cycle, saying

??? Undefined function or variable 'y'.

could someone help me please?i listed my code below:

figure(1);
fs = 22050;
N = length(vocerum.data);
t = (0:1:(N-1))/fs;
subplot(2,1,1), plot(t,vocerum.data); title('segnale prelevato');
xlabel('tempo'); ylabel('ampiezza'); grid on

w = hamming(N)';
nw = length(w);

pos = 1;
while (pos + nw <= N) %while enough signal left
y = vocerum.data(pos:(pos+nw-1)).*w; %make window
pos = pos + nw/2; %next window
end
subplot(2,1,2), plot(y);
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com