wolffd@0: function short = splitLongSeqIntoManyShort(long, Tsmall) wolffd@0: % splitLongSeqIntoManyShort Put groups of columns into a cell array of narrower matrices wolffd@0: % function short = splitLongSeqIntoManyShort(long, Tsmall) wolffd@0: % wolffd@0: % long(:,t) wolffd@0: % short{i} = long(:,ndx1:ndx2) where each segment (except maybe the last) is of length Tsmall wolffd@0: wolffd@0: T = length(long); wolffd@0: Nsmall = ceil(T/Tsmall); wolffd@0: short = cell(Nsmall,1); wolffd@0: wolffd@0: t = 1; wolffd@0: for i=1:Nsmall wolffd@0: short{i} = long(:,t:min(T,t+Tsmall-1)); wolffd@0: t = t+Tsmall; wolffd@0: end