Mercurial > hg > ishara
view dsp/spec2ac.m @ 42:ae596261e75f
Various fixes and development to audio handling
author | samer |
---|---|
date | Tue, 02 Dec 2014 14:51:13 +0000 |
parents | c3b0cd708782 |
children |
line wrap: on
line source
function R=spec2ac(A) % SPEC2AC - convert power spectrum to autocorrelation sequence % % assumes that S is a half-spectrum. % R=spec2ac(S) if isvector(A), A=A(:); end S=[A; A(end-1:-1:2,:)]; R=real(ifft(S)); % autocorrelation R=R(1:(1+size(R,1)/2),:); % extract first half (rest is symmetric)