Wednesday, August 14, 2013

Matlab: split vector into number of parts of roughly the same size

%split into 3 parts
chunckCell=splitvect(1:10, 3);
chunckCell{:}
ans = 1 2 3 ans = 4 5 6 7 ans = 8 9 10