Advertisement
albert828

Spectogram

Nov 23rd, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.47 KB | None | 0 0
  1. % skrypt generuje spektrogramy sygnalu modelowego
  2. % w postaci szumu bialego i sygnalu chirp oraz sygnalu
  3. % mowy
  4.  
  5. % generacja sygnalu modelowego
  6. N = 5000;
  7. fp = 2000;
  8. t = 0:1/fp:(N-1)/fp;
  9. x = chirp (t, 100, 2.5, 900, 'q');
  10.  
  11. % narysowanie wykresow czasowych
  12. subplot(221);
  13. plot(t,x);
  14. xlabel('czas [s]');
  15. ylabel('x(n)');
  16.  
  17. % generacja spektrogramow
  18. subplot (222);
  19. spectrogram (x, 512, 256, 512, fp);
  20. %specgram(x,128,120,128,fp);
  21.  
  22. set (gcf,'Position',[50 50 1200 700]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement