SHARE
TWEET

Untitled

a guest Jun 16th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NFFT = 2^nextpow2(L);    
  2. y_buff = buffer(y,L_buff,overlap,'nodelay');
  3. wnd = hanning(L_buff);
  4.      
  5. size_y_buff = size(y_buff);
  6. num_fft = size_y_buff(2);
  7.  
  8. for j=1:num_fft
  9.    y_fft = y_buff(:,j).*wnd;
  10.    y_fft = [y_fft;zeros(L-L_buff,1)];
  11.    Y_buff = fft(y_fft,NFFT)/(L-L_buff+sum(wnd));
  12.    amp(:,j) = 2*abs(Y_buff(1:NFFT/2+1));
  13. end
  14. amp = sum(amp');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top