view general/arrutils/foldrcols.m @ 42:ae596261e75f

Various fixes and development to audio handling
author samer
date Tue, 02 Dec 2014 14:51:13 +0000
parents 03694e5c8365
children
line wrap: on
line source
% foldrcols - fold array columns from the right
%
% foldrcols :; 
%    ([[M]], [[N]] -> [[M]])   ~'folding function',
%    [[M]]                     ~'initial value',
%    [[N,L]]                   ~'data to scan, sequence of length L'
% -> [[M]].

function y=foldrcols(f,y,X,varargin)
	for i=size(X,2):-1:1, y=f(y,X(:,i)); end
end