Mercurial > hg > ishara
view sequences/@seq/filter.m @ 6:0ce3c2070089
Removed duplicate code and fixed doc in timed_action.
author | samer |
---|---|
date | Mon, 14 Jan 2013 14:33:37 +0000 |
parents | 3f77126f7b5f |
children | b1280319413e |
line wrap: on
line source
function y=filter(a,b,x,z,dim) % filter - filter for sequences of array % % filter :: [[P]], [[P]], seq [Size], [[P]], D:natural -> seq [Size]. % filter :: [[P]], [[P]], seq [Size], [[P]] -> seq [Size]. % filter :: [[P]], [[P]], seq [Size] -> seq [Size]. % % filtering is done along Dth dimension of the array (default=1) if nargin<5, dim=find(size(x)>1,1); if isempty(dim), dim=1; end if nargin<4, z=[]; end end y = mapaccum(@(x1,z1)filter(a,b,x1,z1,dim),x,z);