annotate general/arrutils/foldrcols.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents 03694e5c8365
children
rev   line source
samer@13 1 % foldrcols - fold array columns from the right
samer@13 2 %
samer@13 3 % foldrcols :;
samer@4 4 % ([[M]], [[N]] -> [[M]]) ~'folding function',
samer@4 5 % [[M]] ~'initial value',
samer@4 6 % [[N,L]] ~'data to scan, sequence of length L'
samer@4 7 % -> [[M]].
samer@4 8
samer@4 9 function y=foldrcols(f,y,X,varargin)
samer@12 10 for i=size(X,2):-1:1, y=f(y,X(:,i)); end
samer@12 11 end
samer@4 12
samer@4 13