Mercurial > hg > mauch-mirex-2010
annotate _FullBNT/KPMtools/splitLongSeqIntoManyShort.m @ 9:4ea6619cb3f5 tip
removed log files
author | matthiasm |
---|---|
date | Fri, 11 Apr 2014 15:55:11 +0100 |
parents | b5b38998ef3b |
children |
rev | line source |
---|---|
matthiasm@8 | 1 function short = splitLongSeqIntoManyShort(long, Tsmall) |
matthiasm@8 | 2 % splitLongSeqIntoManyShort Put groups of columns into a cell array of narrower matrices |
matthiasm@8 | 3 % function short = splitLongSeqIntoManyShort(long, Tsmall) |
matthiasm@8 | 4 % |
matthiasm@8 | 5 % long(:,t) |
matthiasm@8 | 6 % short{i} = long(:,ndx1:ndx2) where each segment (except maybe the last) is of length Tsmall |
matthiasm@8 | 7 |
matthiasm@8 | 8 T = length(long); |
matthiasm@8 | 9 Nsmall = ceil(T/Tsmall); |
matthiasm@8 | 10 short = cell(Nsmall,1); |
matthiasm@8 | 11 |
matthiasm@8 | 12 t = 1; |
matthiasm@8 | 13 for i=1:Nsmall |
matthiasm@8 | 14 short{i} = long(:,t:min(T,t+Tsmall-1)); |
matthiasm@8 | 15 t = t+Tsmall; |
matthiasm@8 | 16 end |