Mercurial > hg > ishara
view general/arrutils/foldcols.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | fbc0540a9208 |
children |
line wrap: on
line source
% foldcols - fold from left combinator for columns of an array % % foldcols :; % (A,[[N]]->A) ~'folding function', % A ~'initial value', % [[N,L]] ~'data to scan, sequence of length L' % -> A. function y=foldcols(f,y,X) for i=1:size(X,2), y=f(y,X(:,i)); end end