% -*- texinfo -*- % @deftypefn {Function File} colfilt(@var{A}, [@var{r}, @var{c}], [@var{m}, @var{n}], 'sliding', @var{f},...) % Apply filter to matrix blocks % % For each @var{r} x @var{c} overlapping subblock of @var{A}, add a column in matrix @var{C} % @var{f}(@var{C},...) should return a row vector which is then reshaped into a % a matrix of size @var{A} and returned. @var{A} is processed in chunks of size @var{m} x @var{n}. % @deftypefnx{Function File} colfilt(@var{A}, [@var{r}, @var{c}], [@var{m}, @var{n}], 'distinct', @var{f},...) % For each @var{r} x @var{c} non-overlapping subblock of @var{A}, add a column in matrix @var{C} % @var{f}(@var{C},...) should return a matrix of size @var{C} each column of which is % placed back into the subblock from whence it came. @var{A} is processed % in chunks of size @var{m} x @var{n}. % % The present version requires that [@var{m}, @var{n}] divide size(@var{A}), but for % compatibility it should work even if [@var{m}, @var{n}] does not divide @var{A}. Use % the following instead: % @example % [r, c] = size(A); % padA = zeros (m*ceil(r/m),n*ceil(c/n)); % padA(1:r,1:c) = A; % B = colfilt(padA,...); % B = B(1:r,1:c); % @end example % % The present version does not handle 'distinct' % @end deftypefn