Skip to content

vlt.data.cellarray2mat

  CELLARRAY2MAT - convert cell arrays of vectors to a matrix, filling with NaN

  M = CELLARRAY2MAT(C)

  Convert a cell array of vectors to a matrix, filling in any non-present
  entries with NaN. The columns of M will be the entries of C{i}. Each entry
  C{i} must be a vector or empty.

  Example:
     c{1} = [ 1 2 3];
     c{2} = [ 4 5 ];
     m = vlt.data.cellarray2mat(c);
       % m == [ 1 4; 2 5; 3 NaN]