Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. buf = zeros(1, 22050);
  2.  
  3. for i = 1:300;
  4. index = i * 2000;
  5. val = 1/i;
  6.  
  7. while (index > 22050) || (index < 1)
  8. if (index > 22050)
  9. index = 22050*2 - index;
  10. end
  11. if (index <= 0)
  12. index = -index;
  13. end
  14. end
  15. buf(index) = buf(index) + val;
  16.  
  17.  
  18. end
  19.  
  20. plot(buf)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement