Mercurial > hg > ishara
view arrows/dsp/alpc.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 | beb8a3f4a345 |
line wrap: on
line source
% alpc - LPC arrow % % alpc :: % N:natural ~'size of waveform blocks to expect', % M:natural ~'order of LPC to do' % options { % specfn :: ([[N,T]]->[[dftbins(N),T]])/ @powspec ~'function to compute spectra'; % window :: (N:natural->[[N]]) / @hanning ~'function to compute window' % } % -> arrow({[[N,1]]},{[[M,1]]},empty). function o=alpc(N,M,varargin) opts=prefs('window',@hanning,'nargout',1,varargin{:}); w=spdiag(opts.window(N)); if opts.nargout<=1 o=arr(@fn); else o=arr(@fn2); end function y=fn(x) y=lpc(w*x,M); end function [y,v]=fn2(x) [y,v]=lpc(w*x,M); end end