annotate general/arrutils/chunk.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@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