Facebook
From bartek, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 366
  1. clc;
  2. clear all;
  3. close all;
  4.  
  5. fpr=44100;
  6. Nx=4*fpr;
  7. dt=1/fpr;
  8. fm=1;
  9. t=dt*(0:Nx-1);
  10.  
  11. f0=0;
  12. df=1000;
  13. fch1=f0+df*t;
  14. f0=2000;
  15. df=2000;
  16.  
  17. fch2=f0+df*sin(2*pi*fm*t);
  18. f0=100;
  19. df=0;
  20.  
  21. fch3=f0*exp(2*t);
  22.  
  23. fch=fch1;
  24.  
  25.  
  26. if(0)
  27. x=sin(2*pi*cumsum(fch)*dt);
  28.  
  29. plot(t,x); pause
  30. spectrogram (x, 512, 512-32, 1024, fpr);
  31. soundsc(x,fpr)
  32. end
  33.  
  34. if(1)
  35. f0=1;
  36. for k=0:10
  37.     x=cos(2*pi*(f0+k*fpr)*t) +k/10;
  38.     plot(t,x); hold on;
  39.    
  40. end
  41. end

Replies to Untitled rss

Title Name Language When
Re: Untitled bartek text 5 Years ago.