annotate general/arrutils/scancols.m @ 27:5de03f77dae1
Added documentation about types and revised arrow type specifications.
author |
samer |
date |
Sat, 19 Jan 2013 14:22: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
|