CELLCHUNK is the jCell module of jLab.

 CELLCHUNK  Converts cell array data into uniform length 'chunks'.
 
    Y=CELLCHUNK(X,L), where X is a cell array of variable-length numerical
    arrays, extracts non-overlapping 'chunks' of the uniform length L and
    returns these in Y, a matrix having L rows.
    
    Successive chunks of length L data in X are become successive columns
    in Y, regardless of the cell to which they initially belonged.  
    Residuals of length less then L at the end of each cell are discarded.
 
    For example:
 
        x{1}=[1 2 3 4]'; x{2}=[5 6 7]'; x{3}=[8 9]'; 
 
        cellchunk(x,2) =  [1 3 5 8]
                          [2 4 6 9]
 
    This is useful, for example, in examining spectra from uniform-length 
    intervals in Lagragnian data such as FLOATS.MAT or DRIFTERS.MAT.
 
    If there is a remainder R in how many times L goes into the length of
    the time series, FLOOR(R/2) points will be thrown away from the
    beginning of the time series and CEIL(R/2) points from the end. 
 
    [Y1,Y2,...,YN]=CELLCHUNK(X1,X2,...,XN,L) also works, where the XN are
    all cell array of the same size.
  
    CELLCHUNK also works when the XN are simply column arrays.
 
    CELLCHUNK with no output arguments overwrite the original named input
    variables. 
    __________________________________________________________________
    
    Overlap
 
    CELLCHUNK(...,L,'overlap') instead outputs chunks of length L with a 
    50% overlap.  That is, successive columns of the output overlap by L/2.
 
    In this case, remainders are discarded from the ends of the time 
    series, instead of being split between the beginning and the end as in
    the non-overlapping case.  
    __________________________________________________________________   
 
    Parallelization
 
    CELLCHUNK(...,'parallel') parallelizes the computation using a PARFOR 
    loop.  This requires that Matlab's Parallel Computing Toolbox be 
    installed, and is useful for very large datasets.
    __________________________________________________________________
 
    See also TRAJCHUNK.
 
    'cellchunk --t' runs a test.
 
    Usage: y=cellchunk(x,L);
           [y1,y2,y3]=cellchunk(x1,x2,x3,L);
           [y1,y2,y3]=cellchunk(x1,x2,x3,L,'overlap');
           [y1,y2,y3]=cellchunk(x1,x2,x3,L,'overlap','parallel');
           cellchunk(x1,x2,x3,L);
    __________________________________________________________________
    This is part of JLAB --- type 'help jlab' for more information
    (C) 2014--2015 J.M. Lilly --- type 'help jlab_license' for details

contents | allhelp | index