Mercurial > hg > ishara
view arrows/dsp/afilter.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 |
line wrap: on
line source
% afilter - Linear filter arrow % % afilter :: % [[P]] ~'filter B coefficients', % [[Q]] ~'filter A coefficients', % -> arrow({[[N]]},{[[N]]},[[O]]). % % The arrow afilter(B,A) is equivalent to using filter(B,A,X) % on a signal in an array. function o=afilter(b,a,zi) if nargin<3, zi=[]; end o = loop(@filt,@(s)zi); function [y,z]=filt(x,z) [y,z]=filter(b,a,x,z); end end