annotate general/arrutils/chunk.m @ 20:ed2629b7f02b

Added beginnings of some introductory blurb.
author samer
date Thu, 17 Jan 2013 13:33:36 +0000
parents 03694e5c8365
children
rev   line source
samer@4 1 function B=chunk(A,n,step)
samer@13 2 % chunk - return chunk from inside matrix
samer@13 3 %
samer@13 4 % chunk ::
samer@13 5 % [[N,M]] ~'source array',
samer@13 6 % K:natural ~'index of chunk',
samer@13 7 % L:natural ~'chunk size'
samer@13 8 % -> [[L,M]] ~'K block of L rows'.
samer@4 9
samer@4 10 i=n*step+1;
samer@4 11 B=A(i:i+step-1,:);
samer@4 12
samer@4 13