Mercurial > hg > ishara
annotate arrows/dsp/apowspec1.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
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 |