annotate general/arrutils/scancols.m @ 54:9bcf5e133bf0
Added from old stats library.
author |
samer |
date |
Mon, 23 Feb 2015 16:08:09 +0000 |
parents |
fbc0540a9208 |
children |
|
rev |
line source |
samer@4
|
1 % scancols :;
|
samer@4
|
2 % ([[M]], [[N]] -> [[M]]) ~'scannning function',
|
samer@4
|
3 % [[M]] ~'initial value',
|
samer@4
|
4 % [[N,L]] ~'data to scan, sequence of length L'
|
samer@4
|
5 % -> [[M,L]].
|
samer@4
|
6
|
samer@12
|
7 function Y=scancols(f,y,X)
|
samer@4
|
8 Y=zeros(size(y,1),size(X,2));
|
samer@12
|
9 for i=1:size(X,2), y=f(y,X(:,i)); Y(:,i)=y; end
|
samer@12
|
10 end
|
samer@4
|
11
|
samer@4
|
12
|