MAT2COL is the jVarfun module of jLab.

 MAT2COL  Compress NAN-padded matrix data into long columns.
    C=MAT2COL(M), where the columns of matrix M are data vectors of
    nonuniform length with NANs filling out the gaps in each column,
    appends together all the columns into a vector C in which isolated
    NANs mark the transitions between columns.
    [C1,C2,...,CN]=MAT2COL(M1,M2,...,MN) also works for multiple input 
    matrices of the same size.  In this case the locations of NANs in 
    M1 are used as the key for appending all the MN into columns.  
    MAT2COL, COL2MAT, and COLBREAKS together form a system for moving
    data with segments of nonuniform length rapidly back and forth
    between a column format and a padded-matrix format.
    MAT2COL(M1,M2,...,MN); with no output arguments overwrites the
    original input variables.
    This is part of JLAB --- type 'help jlab' for more information
    (C) 2000--2016 J.M. Lilly --- type 'help jlab_license' for details        

contents | allhelp | index