SHARE
TWEET

Untitled

a guest May 21st, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %% Voice recognition %%
  2. load('dane.mat')
  3. y1 = y(:,1);
  4. load('dane2.mat')
  5. y2 = y(:,1);
  6.  
  7. Y1 = fft(y1);
  8. N=length(y1); %number of samples  
  9. f1=(0:N-1).*Fs/N; %define frequency vector
  10.  
  11. Y2 = fft(y2);
  12. N=length(y2); %number of samples  
  13. f2=(0:N-1).*Fs/N; %define frequency vector
  14.  
  15. figure(5)
  16. subplot(2,1,1)
  17. plot(f1,abs(Y1))
  18. xlabel('Częstotliwość [Hz]');
  19. ylabel('|fft(x(t))|');
  20. xlim([0, Fs/2]);
  21. title('Spectrum of registered voice')
  22.  
  23. subplot(2,1,2)
  24. plot(f2,abs(Y2))
  25. xlabel('Częstotliwość [Hz]');
  26. ylabel('|fft(x(t))|');
  27. xlim([0, Fs/2]);
  28. title('Spectrum of registered voice')
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