Mercurial > hg > ishara
annotate arrows/dsp/apowspec1.m @ 6:0ce3c2070089
Removed duplicate code and fixed doc in timed_action.
author | samer |
---|---|
date | Mon, 14 Jan 2013 14:33:37 +0000 |
parents | 672052bd81f8 |
children |
rev | line source |
---|---|
samer@0 | 1 % apowspec1 - Arrow to compute power spectra (automatic sizing version) |
samer@0 | 2 % |
samer@0 | 3 % apowspec1 :: |
samer@0 | 4 % (N:natural -> [[N]]) ~'analysis window function' |
samer@0 | 5 % -> arrow( {[[N]]}, {[[dftbins(N)]]}, empty). |
samer@0 | 6 |
samer@0 | 7 function o=apowspec1(windowfn) |
samer@0 | 8 o=arrf(@mk,1,1); |
samer@0 | 9 function f=mk(sizes) |
samer@0 | 10 N=sizes{1}(1); |
samer@0 | 11 W=spdiag(windowfn(N)); |
samer@0 | 12 f=@(x)powspec(W*x,N); |
samer@0 | 13 end |
samer@0 | 14 end |