To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Revision:

root / _segmentation / maxfilt1.m

History | View | Annotate | Download (199 Bytes)

1
function outmat = maxfilt1(inmat, len)
2
outmat = inmat;
3
for i = find(sum(inmat)>0)
4
    indi = max(1,i-len):min(size(inmat,2),i+len-1);
5
    temp = inmat(indi,:);
6
    outmat(i,:) = max(temp,[],1);
7
end
8