Mercurial > hg > ishara
diff dsp/oggwin.m @ 32:c3b0cd708782
Imported core dsp tools.
author | samer |
---|---|
date | Sun, 20 Jan 2013 13:48:47 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dsp/oggwin.m Sun Jan 20 13:48:47 2013 +0000 @@ -0,0 +1,20 @@ + +% OGGWIN Ogg-vorbis window. +% y = oggwin(N) +% +% Used in MDCT transform for TDAC +% The window used in Ogg-Vorbis open source codec +% +% N: length of window to create +% y: the window in column + +% ------- oggwin.m ----------------------------------------- +% Marios Athineos, marios@ee.columbia.edu +% http://www.ee.columbia.edu/~marios/ +% Copyright (c) 2004 by Columbia University. +% All rights reserved. +% ---------------------------------------------------------- + +function y = oggwin(N) +x = (0:(N-1)).'; +y = sin(0.5*pi*sin(pi*(x+0.5)/N).^2);